Skip to content

Instantly share code, notes, and snippets.

@xenda
Created October 8, 2012 15:35
Show Gist options
  • Save xenda/3853146 to your computer and use it in GitHub Desktop.
Save xenda/3853146 to your computer and use it in GitHub Desktop.
irb(main):002:0> class Person
irb(main):003:1> def self.something
irb(main):004:2> yield
irb(main):005:2> end
irb(main):006:1> end
=> nil
irb(main):007:0> class NeoHunter
irb(main):008:1> def self.do_stuff
irb(main):009:2> Person.something do
irb(main):010:3* puts self.name
irb(main):011:3> end
irb(main):012:2> end
irb(main):013:1> end
=> nil
irb(main):014:0> NeoHunter.do_stuff
NeoHunter
=> nil
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment