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.



494
495
496
# File 'lib/storable.rb', line 494

def initialize from
  @hash = from
end

Dynamic Method Handling

This class handles dynamic methods through the method_missing method

#method_missing(meth, *args) ⇒ Object



500
501
502
# File 'lib/storable.rb', line 500

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

Instance Method Details

#[](key) ⇒ Object



497
498
499
# File 'lib/storable.rb', line 497

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