Skip to content

Instantly share code, notes, and snippets.

@gabrie30
Created September 16, 2014 01:24
Show Gist options
  • Save gabrie30/12a4de875e59d5a2c0ad to your computer and use it in GitHub Desktop.
Save gabrie30/12a4de875e59d5a2c0ad to your computer and use it in GitHub Desktop.
class Rectangle
def initialize(length, breadth)
@length = length
@breadth = breadth
end
def perimeter
2 * (@length + @breadth)
end
end
Rectangle.new.perimeter(2,4)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment