Skip to main content
Journey Uncommon Logo
JourneyUncommon
mediumRubymethod_missing and respond_to_missingSingle-choice MCQ

In a Child < Parent hierarchy where both define method_missing, what is the idiomatic way for Child#method_missing to delegate cases it does not handle?

class Child < Parent def method_missing(name, *args, &blk) if name.to_s.start_with?("get_") "child:#{name}" else # delegate the rest end end end