public
anonymous / gist:4693598
Created

Custom initializers in macruby

  • Download Gist
gistfile1.txt
1 2 3 4 5 6 7 8 9 10 11 12
framework 'foundation'
 
class Node < NSXMLNode
def initialize(name)
initWithName(name)
self
end
end
 
node = Node.new('root')
 
p node.name

Please sign in to comment on this gist.

Something went wrong with that request. Please try again.