/gist:12a4de875e59d5a2c0ad Secret
Created
September 16, 2014 01:24
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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