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.
31 32 33 34 35 |
# File 'lib/ebisu/models/category.rb', line 31 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.
21 22 23 |
# File 'lib/ebisu/models/category.rb', line 21 def id @id end |
#name ⇒ Object
Returns the value of attribute name.
25 26 27 |
# File 'lib/ebisu/models/category.rb', line 25 def name @name end |
#parent_id ⇒ Object
Returns the value of attribute parent_id.
29 30 31 |
# File 'lib/ebisu/models/category.rb', line 29 def parent_id @parent_id end |