Guest User

Untitled

a guest
May 24th, 2018
100
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.31 KB | None | 0 0
  1. class Base
  2. def initialize
  3. unless @base
  4. @base = "DABASE"
  5. puts "-----------------------------"
  6. puts "This is Base's initializer"
  7. puts "-----------------------------"
  8. end
  9. end
  10. end
  11.  
  12. class Derived < Base
  13.  
  14. end
  15.  
  16. if __FILE__ == $0
  17. 3.times do
  18. Derived.new
  19. end
  20. end
Add Comment
Please, Sign In to add comment