Skip to content

Instantly share code, notes, and snippets.

What would you like to do?
accessing a Hash key/value in Ruby
questions = {
'one' => "What's your name?",
'two' => "How old are you?"
questions['one'] # => returns "What's your name?"
questions['two'] # => returns "How old are you?"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.