Class: YandexTracker::Collections::LocalFields
- Defined in:
- lib/yandex_tracker/collections/local_fields.rb
Overview
Collections::LocalFields
Instance Attribute Summary collapse
-
#queue_id ⇒ Object
readonly
Returns the value of attribute queue_id.
Attributes inherited from Base
Instance Method Summary collapse
- #create(**attributes) ⇒ Object
- #find(key) ⇒ Object
-
#initialize(client, queue_id) ⇒ LocalFields
constructor
A new instance of LocalFields.
- #list(**params) ⇒ Object
Methods inherited from Base
Constructor Details
#initialize(client, queue_id) ⇒ LocalFields
Returns a new instance of LocalFields.
11 12 13 14 15 16 17 |
# File 'lib/yandex_tracker/collections/local_fields.rb', line 11 def initialize(client, queue_id) raise ArgumentError, "queue_id is required" if queue_id.nil? super(client) @resource = Resources::LocalField.new(client) @queue_id = queue_id end |
Instance Attribute Details
#queue_id ⇒ Object (readonly)
Returns the value of attribute queue_id.
9 10 11 |
# File 'lib/yandex_tracker/collections/local_fields.rb', line 9 def queue_id @queue_id end |
Instance Method Details
#create(**attributes) ⇒ Object
24 25 26 27 |
# File 'lib/yandex_tracker/collections/local_fields.rb', line 24 def create(**attributes) response = resource.create(queue_id, **attributes) build_object(Objects::LocalField, response) end |
#find(key) ⇒ Object
19 20 21 22 |
# File 'lib/yandex_tracker/collections/local_fields.rb', line 19 def find(key) response = resource.find(queue_id, key) build_object(Objects::LocalField, response) end |
#list(**params) ⇒ Object
29 30 31 32 |
# File 'lib/yandex_tracker/collections/local_fields.rb', line 29 def list(**params) response = resource.list(queue_id, **params) build_objects(Objects::LocalField, response) end |