Module: SlAah::InstanceMethods

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



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

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