module Bundler::Thor::Actions
def thor(command, *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
Other options are given as parameter to Bundler::Thor.
config
args
command
==== Parameters
switches.
Run a thor command. A hash of options can be given and it's converted to
def thor(command, *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 capture = config.key?(:capture) ? config.delete(:capture) : false args.unshift(command) args.push Bundler::Thor::Options.to_switches(config) command = args.join(" ").strip run command, with: :thor, verbose: verbose, pretend: pretend, capture: capture end