Class: Harvest::API::Tasks
- Inherits:
-
Base
- Object
- Base
- Harvest::API::Tasks
- Includes:
- Behavior::Crud
- Defined in:
- lib/harvest/api/tasks.rb
Instance Attribute Summary
Attributes inherited from Base
Instance Method Summary (collapse)
-
- (Harvest::Task) activate(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
- (Harvest::Task) activate(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 |