Class: Ifin24::Models::Category

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

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(attributes = {}) ⇒ Category

Returns a new instance of Category.



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

def initialize(attributes = {})
  super(attributes)
  @children = []
end

Instance Attribute Details

#childrenObject

Returns the value of attribute children.



4
5
6
# File 'lib/ifin24/models/category.rb', line 4

def children
  @children
end

#idObject

Returns the value of attribute id.



3
4
5
# File 'lib/ifin24/models/category.rb', line 3

def id
  @id
end

#nameObject

Returns the value of attribute name.



3
4
5
# File 'lib/ifin24/models/category.rb', line 3

def name
  @name
end

Instance Method Details

#to_sObject



11
12
13
# File 'lib/ifin24/models/category.rb', line 11

def to_s
  @name
end