Class: Kisaweb::Category

Inherits:
Object show all
Defined in:
lib/kisaweb/category.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(title, amount) ⇒ Category

Returns a new instance of Category.



5
6
7
# File 'lib/kisaweb/category.rb', line 5

def initialize(title, amount)
  self.title, self.amount = title, amount.to_i
end

Instance Attribute Details

#amountObject

Returns the value of attribute amount.



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

def amount
  @amount
end

#titleObject

Returns the value of attribute title.



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

def title
  @title
end