Declaring instance variables iterating over a hash!

前端 未结 4 1432
忘掉有多难
忘掉有多难 2021-02-02 16:43

i want to do the following:

I want to declare the instance variables of a class iterating over a dictionary.

Let\'s assume that i have this hash

         


        
4条回答
  •  余生分开走
    2021-02-02 16:54

    http://facets.rubyforge.org/apidoc/api/more/classes/OpenStructable.html

    OpensStructable is a mixin module which can provide OpenStruct behavior to any class or object. OpenStructable allows extention of data objects with arbitrary attributes.

提交回复
热议问题