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.



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

#idObject

Returns the value of attribute id.



21
22
23
# File 'lib/ebisu/models/category.rb', line 21

def id
  @id
end

#nameObject

Returns the value of attribute name.



25
26
27
# File 'lib/ebisu/models/category.rb', line 25

def name
  @name
end

#parent_idObject

Returns the value of attribute parent_id.



29
30
31
# File 'lib/ebisu/models/category.rb', line 29

def parent_id
  @parent_id
end