Class: Ebisu::YCategory

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

Defined Under Namespace

Classes: IDAndName

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(category) ⇒ YCategory

Returns a new instance of YCategory.



8
9
10
11
12
13
# File 'lib/ebisu/models/category.rb', line 8

def initialize(category)
  @current = IDAndName.new(
      category.dig('Current', 'Id'),
      category.dig('Current', 'Name')
  )
end

Instance Attribute Details

#currentObject

Returns the value of attribute current.



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

def current
  @current
end