Class: Storable::Anonymous

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

Instance Method Summary collapse

Constructor Details

#initialize(from) ⇒ Anonymous

Returns a new instance of Anonymous.



467
468
469
# File 'lib/storable.rb', line 467

def initialize from
  @hash = from
end

Dynamic Method Handling

This class handles dynamic methods through the method_missing method

#method_missing(meth, *args) ⇒ Object



473
474
475
# File 'lib/storable.rb', line 473

def method_missing(meth,*args)
  @hash[meth.to_sym]
end

Instance Method Details

#[](key) ⇒ Object



470
471
472
# File 'lib/storable.rb', line 470

def [](key)
  @hash[meth.to_sym]
end