If my Rakefile does not find a task with a particular name, I'd like rake
to instead create a new task by that name according to certain rules, if a file with the missing task name exists. But if it doesn't, I want to fall back to the default ("Don't know how to build task 'foo'!").
In short, is there a method_missing
for Rake?
method_missing
is really the right thing to look for, though. Rake is really looking up names, not methods, for tasks. It would be more appropriate if there were something like atask_missing
hook that you could override, but a cursory inspection of the code doesn't show anything like that. – Arista