module Thor::Invocation

def _initialize_klass_with_initializer(object, args, opts, config) #:nodoc:

:nodoc:

Initialize klass using values stored in the @_initializer.
def _initialize_klass_with_initializer(object, args, opts, config) #:nodoc:
  if object.is_a?(Class)
    klass = object
    stored_args, stored_opts, stored_config = @_initializer
    args ||= stored_args.dup
    opts ||= stored_opts.dup
    config ||= {}
    config = stored_config.merge(_shared_configuration).merge!(config)
    [ klass, klass.new(args, opts, config) ]
  else
    [ object.class, object ]
  end
end