Class: TrackerApi::Resources::Comment

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

Defined Under Namespace

Classes: UpdateRepresenter

Instance Method Summary collapse

Methods included from Shared::Base

included

Instance Method Details

#saveObject

Raises:

  • (ArgumentError)


29
30
31
32
33
# File 'lib/tracker_api/resources/comment.rb', line 29

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

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