Use Ruby hash value inside of hash -
Is there any way to do something like this:
number = {"one" = & Gt; "Two", "three" = & gt; Number ["a"]} I know that I can just make a hash and can generally set anything like "numbers" ["a"] I'm ... but ugly ...
No, because number right now Not defined, but you can create items assigned more than one variable: # looks strange, but ok ... def_num = "two" numbers = {'one '= & Gt; Def_num, 'two' = & gt; Def_num}
Comments
Post a Comment