class Thor
def map(mappings=nil)
Hash[String|Array => Symbol]:: Maps the string or the strings in the array to the given task.
==== Parameters
Will invoke the list task.
thor -T
Running:
map "-T" => "list"
Maps an input to a task. If you define:
def map(mappings=nil) @map ||= from_superclass(:map, {}) if mappings mappings.each do |key, value| if key.respond_to?(:each) key.each {|subkey| @map[subkey] = value} else @map[key] = value end end end @map end