module Thor::Actions

def thor(task, *args)


#=> thor list --all --substring=rails
thor :list, :all => true, :substring => 'rails'

#=> thor install http://gist.github.com/103208
thor :install, "http://gist.github.com/103208"

==== Examples

are given as parameter to Thor.
config:: give :verbose => false to not log the status. Other options
args:: arguments to the task
task:: the task to be invoked
==== Parameters

switches.
Run a thor command. A hash of options can be given and it's converted to
def thor(task, *args)
  config  = args.last.is_a?(Hash) ? args.pop : {}
  verbose = config.key?(:verbose) ? config.delete(:verbose) : true
  pretend = config.key?(:pretend) ? config.delete(:pretend) : false
  args.unshift task
  args.push Thor::Options.to_switches(config)
  command = args.join(' ').strip
  run command, :with => :thor, :verbose => verbose, :pretend => pretend
end