Class: LiarsDice::DiceRolledEvent

Inherits:
Event
  • Object
show all
Defined in:
lib/liars_dice/event.rb

Instance Attribute Summary collapse

Attributes inherited from Event

#message

Instance Method Summary collapse

Constructor Details

#initialize(dice) ⇒ DiceRolledEvent

Returns a new instance of DiceRolledEvent.



33
34
35
36
# File 'lib/liars_dice/event.rb', line 33

def initialize(dice)
  self.dice = dice
  super("Dice rolled")
end

Instance Attribute Details

#diceObject

Returns the value of attribute dice.



31
32
33
# File 'lib/liars_dice/event.rb', line 31

def dice
  @dice
end