Skip to content

Instantly share code, notes, and snippets.

@garybernhardt
Created February 18, 2013 21:03
Show Gist options
  • Select an option

  • Save garybernhardt/4980728 to your computer and use it in GitHub Desktop.

Select an option

Save garybernhardt/4980728 to your computer and use it in GitHub Desktop.
>> class Foo; attr_accessor :hello; end
>> f = Foo.new
>> f.hello = lambda { puts "why no self?" }
>> f.hello
=> #<Proc:0x0000000102b6e768@(irb):12>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment