[Rubycocoa-devel 1161] %w{ NSString NSArray NSNumber NSDictionary }.map {|klass| Object.const_get(klass).class_eval do; define_method :inspect do; end; end; }

Zurück zum Archiv-Index

Eloy Duran eloy.****@gmail*****
Sat Sep 8 05:22:49 JST 2007


Hello guys,

Recently we discussed in the irc channel about adding a useful
#inspect to these classes.
The following suggestions were made:

#<OSX::NSCFString:0x15a1b5c "foo">

#<OSX::NSCFArray:0x15a0784 [#<OSX::NSCFString:0x15a1b5c "foo">,
#<OSX::NSCFNumber:0x15467ac 99.99>]>

#<OSX::NSCFNumber:0x15467ac 99.99>
#<OSX::NSCFNumber:0x15467ac true>
#<OSX::NSCFNumber:0x15467ac 42>

#<OSX::NSDictionary:0x15a1b5c {#<OSX::NSCFString:0x15a1b5c "foo"> =>
#<OSX::NSCFNumber:0x15467ac 42>}>

What do you all think?

Cheers,
Eloy




More information about the Rubycocoa-devel mailing list
Zurück zum Archiv-Index