4 ms·
This is not a special syntax. It's just ruby 1.9 specific hash literal syntax.
by look_lookatme 18y ago
This is not a special syntax. It's just ruby 1.9 specific hash literal syntax.
- jimbokun 18y agoBut it looks like the important thing is that they have found a way to automatically map this syntax to Objective C method names. EDIT: Or, as the MacRuby docs put it: "MacRuby has a modified version of the parser which detects calls or method definitions using one regular argument, and other arguments using the key/value pair syntax. It will reconstruct the Objective-C full selector if needed. The method name that will be used in the Ruby VM is the same as the Objective-C selector." http://www.macruby.org/trac/wiki/HowDoesMacRubyWork http://www.macruby.org/trac/wiki/HowDoesMacRubyWork