Skip to content

Instantly share code, notes, and snippets.

@perspectivezoom
Created June 14, 2012 18:19
Show Gist options
  • Select an option

  • Save perspectivezoom/2931929 to your computer and use it in GitHub Desktop.

Select an option

Save perspectivezoom/2931929 to your computer and use it in GitHub Desktop.
class Die
attr_accessor :sides
def initialize(sides)
@sides = sides
end
def roll
rand(sides) + 1
end
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment