Skip to content

Instantly share code, notes, and snippets.

@Adzz
Created May 24, 2018 15:53
Show Gist options
  • Save Adzz/dbc8a30b8f1f5e544f0174a810ff10ec to your computer and use it in GitHub Desktop.
Save Adzz/dbc8a30b8f1f5e544f0174a810ff10ec to your computer and use it in GitHub Desktop.
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