Method: Thor::Runner#method_missing

Defined in:
lib/thor/runner.rb

#method_missing(meth, *args) ⇒ Object

If a command is not found on Thor::Runner, method missing is invoked and Thor::Runner is then responsible for finding the command in all classes.



36
37
38
39
40
41
42
43
# File 'lib/thor/runner.rb', line 36

def method_missing(meth, *args)
  meth = meth.to_s
  initialize_thorfiles(meth)
  klass, command = Thor::Util.find_class_and_command_by_namespace(meth)
  self.class.handle_no_command_error(command, false) if klass.nil?
  args.unshift(command) if command
  klass.start(args, :shell => shell)
end