Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- class Base
- def initialize
- unless @base
- @base = "DABASE"
- puts "-----------------------------"
- puts "This is Base's initializer"
- puts "-----------------------------"
- end
- end
- end
- class Derived < Base
- end
- if __FILE__ == $0
- 3.times do
- Derived.new
- end
- end
Add Comment
Please, Sign In to add comment