Class: YandexTracker::Objects::Comment

Inherits:
Base
  • Object
show all
Defined in:
lib/yandex_tracker/objects/comment.rb

Overview

Objects::Comment

Instance Attribute Summary

Attributes inherited from Base

#client, #context, #data

Instance Method Summary collapse

Methods inherited from Base

#expand, #id, #initialize, #method_missing, #respond_to_missing?

Constructor Details

This class inherits a constructor from YandexTracker::Objects::Base

Dynamic Method Handling

This class handles dynamic methods through the method_missing method in the class YandexTracker::Objects::Base

Instance Method Details

#attachmentsObject



9
10
11
# File 'lib/yandex_tracker/objects/comment.rb', line 9

def attachments
  @attachments ||= Collections::Attachments.new(client, context[:issue_id], comment_id: id)
end

#update(**attributes) ⇒ Object

Raises:

  • (ArgumentError)


13
14
15
16
17
18
# File 'lib/yandex_tracker/objects/comment.rb', line 13

def update(**attributes)
  raise ArgumentError, "issue_id is required" unless context[:issue_id]

  response = resource.update(context[:issue_id], id, **attributes)
  refresh_from(response)
end