Class: Aqua::Storage

Inherits:
Mash
  • Object
show all
Defined in:
lib/aqua/store/storage.rb

Instance Method Summary collapse

Dynamic Method Handling

This class handles dynamic methods through the method_missing method

#method_missing(method, *args) ⇒ Object

auto loads the default store to CouchDB if Store is used without Aqua configuration of a store



6
7
8
9
10
11
12
13
# File 'lib/aqua/store/storage.rb', line 6

def method_missing( method, *args )
  if respond_to?( :commit ) 
    raise NoMethodError, "#{method} undefined for #{self.inspect}"
  else
    Aqua.set_storage_engine # to default, currently CouchDB   
    send( method.to_sym, *args ) # resend!
  end  
end