Ruby - Metaprogramming Fundamentals
How can you modify this Ruby class so that respond_to? correctly returns true for methods starting with process_?
class Processor
def method_missing(method_name, *args)
if method_name.to_s.start_with?("process_")
"Processing #{args.join(", ")}"
else
super
end
end
end