Module: Thor::Invocation::ClassMethods

Defined in:
lib/vendor/thor/lib/thor/invocation.rb

Instance Method Summary collapse

Instance Method Details

#prepare_for_invocation(key, name) ⇒ Object

This method is responsible for receiving a name and find the proper class and task for it. The key is an optional parameter which is available only in class methods invocations (i.e. in Thor::Group).



11
12
13
14
15
16
17
18
# File 'lib/vendor/thor/lib/thor/invocation.rb', line 11

def prepare_for_invocation(key, name) #:nodoc:
  case name
    when Symbol, String
      Thor::Util.find_class_and_task_by_namespace(name.to_s)
    else
      name
  end
end