Class: Gacha::Item
- Inherits:
-
Object
- Object
- Gacha::Item
- Defined in:
- lib/gacha/item.rb
Instance Attribute Summary collapse
-
#id ⇒ Object
Returns the value of attribute id.
-
#rate ⇒ Object
Returns the value of attribute rate.
Instance Method Summary collapse
-
#initialize(id, rate) ⇒ Item
constructor
A new instance of Item.
- #to_s ⇒ Object
Constructor Details
#initialize(id, rate) ⇒ Item
Returns a new instance of Item.
5 6 7 8 |
# File 'lib/gacha/item.rb', line 5 def initialize(id, rate) @id = id @rate = rate end |
Instance Attribute Details
#id ⇒ Object
Returns the value of attribute id.
3 4 5 |
# File 'lib/gacha/item.rb', line 3 def id @id end |
#rate ⇒ Object
Returns the value of attribute rate.
3 4 5 |
# File 'lib/gacha/item.rb', line 3 def rate @rate end |
Instance Method Details
#to_s ⇒ Object
10 11 12 |
# File 'lib/gacha/item.rb', line 10 def to_s "(#{@id}, #{@rate})" end |