Class: IndeStruct::Parser::OpenStructAnyCase
- Inherits:
-
OpenStruct
- Object
- OpenStruct
- IndeStruct::Parser::OpenStructAnyCase
- Defined in:
- lib/inde_struct/parser/open_struct_any_case.rb
Instance Method Summary collapse
-
#initialize(hash = nil) ⇒ OpenStructAnyCase
constructor
A new instance of OpenStructAnyCase.
Constructor Details
#initialize(hash = nil) ⇒ OpenStructAnyCase
Returns a new instance of OpenStructAnyCase.
8 9 10 11 12 13 14 15 16 17 |
# File 'lib/inde_struct/parser/open_struct_any_case.rb', line 8 def initialize(hash=nil) @table = IndeStruct::Parser::HashAnyCase.new if hash hash.each_pair do |k, v| k = k.to_sym @table[k] = v new_ostruct_member(k) end end end |