Class: Ebisu::CategoryIdPath
- Inherits:
-
Object
- Object
- Ebisu::CategoryIdPath
- Defined in:
- lib/ebisu/models/category_id_path.rb
Instance Attribute Summary collapse
-
#path ⇒ Object
Returns the value of attribute path.
Instance Method Summary collapse
-
#initialize(data) ⇒ CategoryIdPath
constructor
A new instance of CategoryIdPath.
Constructor Details
#initialize(data) ⇒ CategoryIdPath
Returns a new instance of CategoryIdPath.
8 9 10 11 12 13 14 15 |
# File 'lib/ebisu/models/category_id_path.rb', line 8 def initialize(data) @path = case data when Array data.map { |x| x['id'] } else [] end end |
Instance Attribute Details
#path ⇒ Object
Returns the value of attribute path.
7 8 9 |
# File 'lib/ebisu/models/category_id_path.rb', line 7 def path @path end |