Class: OpenStruct

Inherits:
Object
  • Object
show all
Defined in:
lib/core_ext/ostruct/hash_access.rb

Instance Method Summary collapse

Instance Method Details

#[](name) ⇒ Object



2
3
4
# File 'lib/core_ext/ostruct/hash_access.rb', line 2

def [](name)
  @table[name.to_sym]
end

#[]=(name, value) ⇒ Object



6
7
8
# File 'lib/core_ext/ostruct/hash_access.rb', line 6

def []=(name, value)
  @table[name.to_sym] = value
end