class TrackerApi::Resources::Epic

Public Instance Methods

comments(reload: false) click to toggle source

Provides a list of all the comments on the epic.

# File lib/tracker_api/resources/epic.rb, line 39
def comments(reload: false)
  if !reload && @comments.present?
    @comments
  else
    @comments = Endpoints::Comments.new(client).get(project_id, epic_id: id)
  end
end
create_comment(params) click to toggle source

@param [Hash] params attributes to create the comment with @return [Comment] newly created Comment

# File lib/tracker_api/resources/epic.rb, line 49
def create_comment(params)
  files = params.delete(:files)
  comment = Endpoints::Comment.new(client).create(project_id, epic_id: id, params: params)
  comment.create_attachments(files: files) if files.present?
  comment
end
save() click to toggle source

Save changes to an existing Epic.

# File lib/tracker_api/resources/epic.rb, line 32
def save
  raise ArgumentError, 'Can not update an epic with an unknown project_id.' if project_id.nil?

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