Class: Ebisu::CategoryDetail
- Inherits:
-
Object
- Object
- Ebisu::CategoryDetail
- Defined in:
- lib/ebisu/models/category.rb
Instance Attribute Summary collapse
-
#id ⇒ Object
Returns the value of attribute id.
-
#name ⇒ Object
Returns the value of attribute name.
-
#parent_id ⇒ Object
Returns the value of attribute parent_id.
Instance Method Summary collapse
-
#initialize(data) ⇒ CategoryDetail
constructor
A new instance of CategoryDetail.
Constructor Details
#initialize(data) ⇒ CategoryDetail
Returns a new instance of CategoryDetail.
29 30 31 32 33 |
# File 'lib/ebisu/models/category.rb', line 29 def initialize(data) @id = data.dig('Id') @name = data.dig('Title', 'Short') @parent_id = data.dig('ParentId') end |
Instance Attribute Details
#id ⇒ Object
Returns the value of attribute id.
19 20 21 |
# File 'lib/ebisu/models/category.rb', line 19 def id @id end |
#name ⇒ Object
Returns the value of attribute name.
23 24 25 |
# File 'lib/ebisu/models/category.rb', line 23 def name @name end |
#parent_id ⇒ Object
Returns the value of attribute parent_id.
27 28 29 |
# File 'lib/ebisu/models/category.rb', line 27 def parent_id @parent_id end |