Module: MmAdapter::InstanceMethods

Defined in:
lib/models/mm_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



48
49
50
51
# File 'lib/models/mm_adapter.rb', line 48

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



43
44
45
46
# File 'lib/models/mm_adapter.rb', line 43

def update(attributes)
  @instance.update_attributes attributes
  @instance.save
end