Class: Ebisu::CategoryIdPath

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

Instance Attribute Summary collapse

Instance Method Summary collapse

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

#pathObject

Returns the value of attribute path.



7
8
9
# File 'lib/ebisu/models/category_id_path.rb', line 7

def path
  @path
end