Class: YandexTracker::Collections::Categories

Inherits:
Base
  • Object
show all
Defined in:
lib/yandex_tracker/collections/categories.rb

Overview

Collections::Categories

Instance Attribute Summary

Attributes inherited from Base

#client

Instance Method Summary collapse

Methods inherited from Base

#inspect

Constructor Details

#initialize(client) ⇒ Categories



9
10
11
12
# File 'lib/yandex_tracker/collections/categories.rb', line 9

def initialize(client)
  super
  @resource = Resources::Category.new(client)
end

Instance Method Details

#create(**attributes) ⇒ Object



19
20
21
22
# File 'lib/yandex_tracker/collections/categories.rb', line 19

def create(**attributes)
  response = resource.create(**attributes)
  build_object(Objects::Category, response)
end

#find(id) ⇒ Object



14
15
16
17
# File 'lib/yandex_tracker/collections/categories.rb', line 14

def find(id)
  response = resource.find(id)
  build_object(Objects::Category, response)
end

#list(**params) ⇒ Object



24
25
26
27
# File 'lib/yandex_tracker/collections/categories.rb', line 24

def list(**params)
  response = resource.list(**params)
  build_objects(Objects::Category, response)
end