Class: YandexTracker::Objects::Issue

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

Overview

Objects::Issue

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



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

def attachments
  if data["attachments"]
    build_objects(Objects::Attachment, data["attachments"])
  else
    Collections::Attachments.new(client, id)
  end
end

#commentsObject



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

def comments
  @comments ||= Collections::Comments.new(client, id)
end

#transition(transition_id, **attributes) ⇒ Object



26
27
28
# File 'lib/yandex_tracker/objects/issue.rb', line 26

def transition(transition_id, **attributes)
  resource.transition(id, transition_id, **attributes)
end

#update(**attributes) ⇒ Object



21
22
23
24
# File 'lib/yandex_tracker/objects/issue.rb', line 21

def update(**attributes)
  response = resource.update(id, attributes)
  refresh_from(response)
end