Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- # File: circle.rb
- #
- class Circle < Shape
- def initialize(radius:, center:)
- @radius = radius
- @center = center
- end
- def draw(width:, height:)
- draw_type_and_dimensions(width: width, height: height)
- puts "My radius will be: #{radius} and my center will be: #{center}"
- end
- private
- attr_reader :radius, :center
- end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement