Class: TrackerApi::Resources::Task

Inherits:
Object
  • Object
show all
Includes:
Shared::Base
Defined in:
lib/tracker_api/resources/task.rb

Defined Under Namespace

Classes: UpdateRepresenter

Instance Method Summary collapse

Methods included from Shared::Base

included

Instance Method Details

#saveObject

Raises:

  • (ArgumentError)


26
27
28
29
30
31
# File 'lib/tracker_api/resources/task.rb', line 26

def save
  raise ArgumentError, 'Cannot update a task with an unknown project_id.' if project_id.nil?
  raise ArgumentError, 'Cannot update a task with an unknown story_id.' if story_id.nil?

  Endpoints::Task.new(client).update(self, UpdateRepresenter.new(Task.new(self.dirty_attributes)))
end