On Thu, May 8, 2008 at 8:32 AM, Sandro P.
[email protected] wrote:
contains_point :x=>value, :y=>value
And in Ruby 1.9 you can also use the new hash literal syntax in the
call so it becomes:
contains_point x: value y: value
Apple’s RubyCocoa, which is implementing Ruby on the Objective-C
runtime actually turns this into an objective-c call.
However, the semantics of Ruby keyword/hash option parameters are
slightly different from the Smalltalk inspired Objective-C method
selectors. In Smalltalk/ObjectiveC x:y: is a different message and
will find a different method than y:x:, whereas Ruby keyword/hash
parameters are order independent and aren’t involved in resolving a
message to a method.
My blog on Ruby