in Objective-C, sending a message named play to an object named sound [sound play];
in Ruby, the corresponding message sound.play
Syntax different between Objective-C and Ruby(II)
in Objective-C, messages include arguments, the arguments are interleaved with tags that describe them [sound initWithContentsOfFile:filename byReference:false];
in Ruby, the corresponding message sound.initWithContentsOfFile(filename, :byReference, false) * argument tags are included as parameters of the message, in this case is “ byReference”
0 comments
Post a comment