I have a subclass that I would like to implement some default behavior for a set of methods, for example if I know I need to override the method, but just want to print a warning for now if the method is not yet supported on this particular subclass.
I can override each method in the subclass, like so, but I was wondering if there was a easier way, maybe using delegate or method_missing?
class Foo
def method_a
# do foo stuff
end
def method_b
# do foo stuff
end
def method_c
# do foo stuff
end
end
class Bar < Foo
def not_yet_supported
puts "warnnig not yet supported"
end
def method_b
not_yet_supported
end
end