Advertisement
Guest User

Untitled

a guest
Jun 24th, 2019
70
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.33 KB | None | 0 0
  1. # File: circle.rb
  2. #
  3. class Circle < Shape
  4. def initialize(radius:, center:)
  5. @radius = radius
  6. @center = center
  7. end
  8.  
  9. def draw(width:, height:)
  10. draw_type_and_dimensions(width: width, height: height)
  11. puts "My radius will be: #{radius} and my center will be: #{center}"
  12. end
  13.  
  14. private
  15.  
  16. attr_reader :radius, :center
  17. end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement