Class: Harvest::API::Tasks
- Inherits:
-
Base
- Object
- Base
- Harvest::API::Tasks
- Includes:
- Behavior::Crud
- Defined in:
- lib/forecast/api/tasks.rb
Instance Method Summary collapse
-
#activate(task) ⇒ Harvest::Task
Activates the task.
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/forecast/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 |