[] 2

hsh[key] â value
Instance Public methods

Element ReferenceâRetrieves the value object corresponding to the key object. If not found, returns the default value (see Hash::new for details).

h = { "a" => 100, "b" => 200 }
h["a"]   #=> 100
h["c"]   #=> nil
doc_ruby_on_rails
2015-04-11 21:47:03
Comments
Leave a Comment

Please login to continue.