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.



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

def initialize(category)
  @current = IDAndName.new(
    category.dig('id'),
    category.dig('name')
  )
end

Instance Attribute Details

#currentObject

Returns the value of attribute current.



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

def current
  @current
end