Class: Harvest::API::Tasks
- Includes:
- Behavior::Crud
- Defined in:
- lib/harvest/api/tasks.rb
Instance Attribute Summary
Attributes inherited from Base
Instance Method Summary collapse
-
#activate(task) ⇒ Harvest::Task
Activates the task.
Methods included from Behavior::Crud
#all, #create, #delete, #find, #update
Methods inherited from Base
Constructor Details
This class inherits a constructor from Harvest::API::Base
Instance Method Details
#activate(task) ⇒ Harvest::Task
Activates the task. Does nothing if the task is already activated
26 27 28 29 30 31 32 |
# File 'lib/harvest/api/tasks.rb', line 26 def activate(task) if !task.active? request(:post, credentials, "#{api_model.api_path}/#{task.to_i}/activate", :headers => {'Content-Length' => '0'}) task.active = true end task end |