Module: TcAdapter::InstanceMethods

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



63
64
65
66
# File 'lib/models/tc_adapter.rb', line 63

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

Instance Method Details

#idObject

this was the only thing that didn’t get passed on to method_missing because this is a method of object doh



69
70
71
# File 'lib/models/tc_adapter.rb', line 69

def id
  @instance.id
end

#update(attributes) ⇒ Object



59
60
61
# File 'lib/models/tc_adapter.rb', line 59

def update(attributes)
  @instance.update attributes
end