Class: Die

Inherits:
Object
  • Object
show all
Defined in:
lib/die.rb

Class Method Summary collapse

Class Method Details

.roll(sides) ⇒ Object



2
3
4
# File 'lib/die.rb', line 2

def Die.roll(sides)
  (rand * sides).to_i + 1
end