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



73
74
75
76
# File 'lib/models/tc_adapter.rb', line 73

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



79
80
81
# File 'lib/models/tc_adapter.rb', line 79

def id
  @instance.id
end

#update(attributes) ⇒ Object



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

def update(attributes)
  @instance.update attributes
end