Skip to content

Instantly share code, notes, and snippets.

@perspectivezoom
Created June 14, 2012 18:10
Show Gist options
  • Save perspectivezoom/2931891 to your computer and use it in GitHub Desktop.
Save perspectivezoom/2931891 to your computer and use it in GitHub Desktop.
class Rectangle
def initialize(length, width)
@length = length
@width = width
end
def perimeter
(@length + @width) * 2
end
def area
@length * @width
end
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment