Hi, I am newbie in Ruby.. seeking some help..
I have a code
DB = { 'key1' => "value1",
'key2' => "value2"}
key = gets
DB["#{key}"]
when i enter key1
from console i get nil
how to resolve this?
I tried few different alternative but could not solve it. hope to get help here.
Thanks