Advertisement
Guest User

Untitled

a guest
Jun 24th, 2019
58
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.34 KB | None | 0 0
  1. # File: triangle.rb
  2. #
  3. class Triangle < Shape
  4. def initialize(first:, second:, third:)
  5. @first = first
  6. @second = second
  7. @third = third
  8. end
  9.  
  10. def draw(width:, height:)
  11. super
  12. puts "My first point is #{first}, my second point is #{second} and my third point is #{third}"
  13. end
  14.  
  15. private
  16.  
  17. attr_reader :first, :second, :third
  18. end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement