Class: DiabloGame::Dice
- Inherits:
-
Object
- Object
- DiabloGame::Dice
- Defined in:
- lib/diablo_game/dice.rb
Instance Attribute Summary collapse
-
#number ⇒ Object
readonly
Returns the value of attribute number.
Instance Method Summary collapse
Instance Attribute Details
#number ⇒ Object (readonly)
Returns the value of attribute number.
3 4 5 |
# File 'lib/diablo_game/dice.rb', line 3 def number @number end |
Instance Method Details
#roll ⇒ Object
5 6 7 |
# File 'lib/diablo_game/dice.rb', line 5 def roll @number = rand(1..6) end |