why is this code not displaying Error! Error! that was defined in the first class ? note my comments# on the line before last. I just want to understand why is it that i have to create another variable = .new ?
class ApplicationError def display_error puts "Error! Error!" end end class SuperBadError < ApplicationError end #err = SuperBadError.new #err.display_error puts SuperBadError
class SuperBadError < ApplicationError
a way of showing that i inherited the attributes from ApplicationError to SuperBadError ? if so why can't i just say :
puts SuperBadError ? it makes sense this way but making another .new method is confusing