Class: Chiketto::Category
Instance Attribute Summary collapse
-
#name ⇒ Object
Returns the value of attribute name.
-
#resource_uri ⇒ Object
Returns the value of attribute resource_uri.
-
#short_name ⇒ Object
Returns the value of attribute short_name.
Attributes inherited from Resource
Class Method Summary collapse
Methods inherited from Resource
endpoint, get, #initialize, legacy_endpoint, open_post, post, query, token
Methods included from AttrDSL
Constructor Details
This class inherits a constructor from Chiketto::Resource
Instance Attribute Details
#name ⇒ Object
Returns the value of attribute name.
3 4 5 |
# File 'lib/chiketto/category.rb', line 3 def name @name end |
#resource_uri ⇒ Object
Returns the value of attribute resource_uri.
3 4 5 |
# File 'lib/chiketto/category.rb', line 3 def resource_uri @resource_uri end |
#short_name ⇒ Object
Returns the value of attribute short_name.
3 4 5 |
# File 'lib/chiketto/category.rb', line 3 def short_name @short_name end |
Class Method Details
.list ⇒ Object
7 8 9 10 |
# File 'lib/chiketto/category.rb', line 7 def self.list categories = get 'categories' categories['categories'].map { |cat| Chiketto::Category.new cat } end |