Method: Thor::Invocation#invoke_command

Defined in:
lib/thor/invocation.rb

#invoke_command(command, *args) ⇒ Object Also known as: invoke_task

Invoke the given command if the given args.


122
123
124
125
126
127
128
129
# File 'lib/thor/invocation.rb', line 122

def invoke_command(command, *args) #:nodoc:
  current = @_invocations[self.class]

  unless current.include?(command.name)
    current << command.name
    command.run(self, *args)
  end
end