class Circle
Public Class Methods
new(circle_length)
click to toggle source
# File lib/classes.rb, line 154 def initialize(circle_length) @circle_length = circle_length end
Public Instance Methods
radius_by_length()
click to toggle source
# File lib/classes.rb, line 158 def radius_by_length @circle_length / (2 * 3.14) end
square()
click to toggle source
# File lib/classes.rb, line 162 def square ((radius_by_length**2) * 3.14).round(4) end