Class: Ebisu::CategoryDetail

Inherits:
Object
  • Object
show all
Defined in:
lib/ebisu/models/category.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

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

#idObject

Returns the value of attribute id.



19
20
21
# File 'lib/ebisu/models/category.rb', line 19

def id
  @id
end

#nameObject

Returns the value of attribute name.



23
24
25
# File 'lib/ebisu/models/category.rb', line 23

def name
  @name
end

#parent_idObject

Returns the value of attribute parent_id.



27
28
29
# File 'lib/ebisu/models/category.rb', line 27

def parent_id
  @parent_id
end