vendor/bundle/ruby/1.9.1/gems/thor-0.14.6/lib/thor.rb
# The method responsible for dispatching given the args.
The method responsible for dispatching given the args.
The method responsible for dispatching given the args .
def dispatch(meth, given_args, given_opts, config) 
        meth ||= retrieve_task_name(given_args)
        task = all_tasks[normalize_task_name(meth)]
        if task
          args, opts = Thor::Options.split(given_args)
        else
          args, opts = given_args, nil
          task = Thor::DynamicTask.new(meth)
        end
        opts = given_opts || opts || []
        config.merge!(:current_task => task, :task_options => task.options)
        trailing = args[Range.new(arguments.size, -1)]
        new(args, opts, config).invoke_task(task, trailing || [])
      end
def dispatch ( meth , given_args , given_opts , config ) meth ||= retrieve_task_name ( given_args ) task = all_tasks [ normalize_task_name ( meth ) ] if task args , opts = Thor :: Options . split ( given_args ) else args , opts = given_args , nil task = Thor :: DynamicTask . new ( meth ) end opts = given_opts || opts || [ ] config . merge! ( :current_task => task , :task_options => task . options ) trailing = args [ Range . new ( arguments . size , - 1 ) ] new ( args , opts , config ) . invoke_task ( task , trailing || [ ] ) end
The method responsible for dispatching given the args.
The method responsible for dispatching given the args .
#:nodoc:
meth
<not_specific>
given_args
<not_specific>
given_opts
<not_specific>
config
<not_specific>