task (Capistrano::Configuration::Namespaces)

    # File lib/capistrano/configuration/namespaces.rb, line 90
          def task(name, options={}, &block)
            name = name.to_sym
            raise ArgumentError, "expected a block" unless block_given?

            task_already_defined = tasks.key?(name)
            if all_methods.any? { |m| m.to_sym == name } && !task_already_defined
              thing = namespaces.key?(name) ? "namespace" : "method"
              raise ArgumentError, "defining a task named `#{name}' would shadow an existing #{thing} with that name"
            end

            tasks[name] = TaskDefinition.new(name, self, {:desc => next_description(:reset)}.merge(options), &block)

            if !task_already_defined
              metaclass = class << self; self; end
              metaclass.send(:define_method, name) { execute_task(tasks[name]) }
            end
          end