Sha256: 299d7323585fcd8637dd04f2bb273611af81118d13d897dedcc462374d74bd8d
Contents?: true
Size: 255 Bytes
Versions: 5
Compression:
Stored size: 255 Bytes
Contents
class RolledDice attr_reader :result, :rolls def initialize( rolls ) @rolls = rolls @result = rolls.reduce(:+) end #Â Required for tests def ==( rolled_dice ) @rolls == rolled_dice.rolls && @result == rolled_dice.result end end
Version data entries
5 entries across 5 versions & 1 rubygems
Version | Path |
---|---|
hazard-1.2.0 | lib/rolled_dice.rb |
hazard-1.1.0 | lib/rolled_dice.rb |
hazard-1.0.4 | lib/rolled_dice.rb |
hazard-1.0.3 | lib/rolled_dice.rb |
hazard-1.0.2 | lib/rolled_dice.rb |