Created
May 24, 2018 15:53
-
-
Save Adzz/dbc8a30b8f1f5e544f0174a810ff10ec to your computer and use it in GitHub Desktop.
This file contains hidden or 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 Circle | |
def initialize(radius) | |
@radius = radius | |
end | |
def area() | |
3.14 * @radius * @radius | |
end | |
end | |
Circle.new(10).area #=> 314.0 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment