Class: FreeAgent::Timeslip
Instance Attribute Summary
Attributes inherited from Entity
Instance Method Summary collapse
-
#initialize(resource, attributes = {}) ⇒ Timeslip
constructor
A new instance of Timeslip.
Methods inherited from Entity
belongs_to, #destroy, has_many, #id, #reload, #save, #update, #url, xml_name
Constructor Details
#initialize(resource, attributes = {}) ⇒ Timeslip
Returns a new instance of Timeslip.
225 226 227 228 229 |
# File 'lib/free_agent.rb', line 225 def initialize(resource, attributes={}) # need to convert /projects/123/timeslips/456 into /timeslips/456 tweaked_resource = RestClient::Resource.new(resource.url.gsub(/\/projects\/\d+\//, "/"), resource.) super(tweaked_resource, attributes) end |
Dynamic Method Handling
This class handles dynamic methods through the method_missing method in the class FreeAgent::Entity