by devrieda · 17y ago · 0 comments
Objective-C:
NSWindow *window = [[NSWindow alloc]
initWithContentRect:frame
styleMask:NSBorderlessWindowMask
backing:NSBackingStoreBuffered
defer:false];
RubyCocoa: window = NSWindow.alloc.initWithContentRect_styleMask_backing_defer(
frame,
NSBorderlessWindowMask,
NSBackingStoreBuffered,
false)
MacRuby: window = NSWindow.alloc.initWithContentRect frame,
styleMask:NSBorderlessWindowMask,
backing:NSBackingStoreBuffered,
defer:falseEDIT: 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."