Module: DmAdapter::InstanceMethods

Defined in:
lib/models/dm_adapter.rb

Instance Method Summary collapse

Dynamic Method Handling

This class handles dynamic methods through the method_missing method

#method_missing(meth, *args, &block) ⇒ Object



45
46
47
48
# File 'lib/models/dm_adapter.rb', line 45

def method_missing(meth, *args, &block)
  #cool I just found out * on an array turns the array into a list of args for a function
  @instance.send(meth, *args, &block)
end

Instance Method Details

#update(attributes) ⇒ Object



41
42
43
# File 'lib/models/dm_adapter.rb', line 41

def update(attributes)
  @instance.update attributes
end