Skip to content

Instantly share code, notes, and snippets.

@gabrie30
Created September 16, 2014 01:24
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