Class: OpenStruct

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

Instance Method Summary collapse

Instance Method Details

#[](key) ⇒ Object



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

def [] key
  send key
end

#[]=(key, val) ⇒ Object



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

def []= key, val
  send %(#{key}=), val
end