Class: Kisaweb::Category
- Inherits:
-
Object
- Object
- Kisaweb::Category
- Defined in:
- lib/kisaweb/category.rb
Instance Attribute Summary collapse
-
#amount ⇒ Object
Returns the value of attribute amount.
-
#title ⇒ Object
Returns the value of attribute title.
Instance Method Summary collapse
-
#initialize(title, amount) ⇒ Category
constructor
A new instance of Category.
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
#amount ⇒ Object
Returns the value of attribute amount.
3 4 5 |
# File 'lib/kisaweb/category.rb', line 3 def amount @amount end |
#title ⇒ Object
Returns the value of attribute title.
3 4 5 |
# File 'lib/kisaweb/category.rb', line 3 def title @title end |