Skip to navigation
How to use a varialbe as a hash key.?
07.12.13
Use eval: var = "id" var2 = "name" Hashobj = {:id =>1,:name=>'foo'} eval("Hashobj[:#{var}]") --> 1 eval("Hashobj[:#{var2}]") --> foo
Reply
Anonymous
How to use a varialbe as a hash key.?
Use eval: var = "id" var2 = "name" Hashobj = {:id =>1,:name=>'foo'} eval("Hashobj[:#{var}]") --> 1 eval("Hashobj[:#{var2}]") --> foo
07.12.13
Reply
Anonymous
Information Epoch 1732364885
ACID (Atomicity, Consistency, Isolation, and Durability)
Home
Notebook
Contact us