Skip to content

Instantly share code, notes, and snippets.

@jspillers
Created April 9, 2012 20:50
Show Gist options
  • Save jspillers/2346471 to your computer and use it in GitHub Desktop.
Save jspillers/2346471 to your computer and use it in GitHub Desktop.
>> hsh = { :foo => ->(x){ {x: x } }}
=> {:foo=>#<Proc:0x007ff2c20320c0@(irb):9 (lambda)>}
>> hsh[:foo]
=> #<Proc:0x007ff2c20320c0@(irb):9 (lambda)>
>> hsh[:foo].call('qwerasdf')
=> {:x=>"qwerasdf"}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment