Skip to content

Instantly share code, notes, and snippets.

/ruby.rb Secret

Created August 10, 2016 22:38
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save anonymous/542a7ba508cab1379b26b0828b15ce7d to your computer and use it in GitHub Desktop.
Save anonymous/542a7ba508cab1379b26b0828b15ce7d to your computer and use it in GitHub Desktop.
[1] pry(main)> def foo(hash_thing)
[1] pry(main)* hash_thing[:foo]
[1] pry(main)* end
=> :foo
[2] pry(main)> hash = { foo: 'bar' }
=> {:foo=>"bar"}
[3] pry(main)> foo hash
=> "bar"
[4] pry(main)>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment