Module: Capistrano::Configuration::Namespaces

Module | Capistrano::Configuration::Namespaces
In: | lib/capistrano/configuration/namespaces.rb

### Methods

default_task desc find_task fully_qualified_name namespace next_description search_task task task_list top

### Classes and Modules

Class Capistrano::Configuration::Namespaces::Namespace

### Constants

DEFAULT_TASK | = | :default

### Attributes

name | [R] | The name of this namespace. Defaults to `nil` for the top-level namespace.
namespaces | [R] | The hash of namespaces defined for this namespace.
parent | [R] | The parent namespace of this namespace. Returns `nil` for the top-level namespace.
tasks | [R] | The hash of tasks defined for this namespace.

### Public Instance methods

default_task()

Returns the default task for this namespace. This will be `nil` if the namespace is at the top-level, and will otherwise return the task named "default". If no such task exists, `nil` will be returned.

desc(text)

Describe the next task to be defined. The given text will be attached to the next task that is defined and used as its description.

find_task(name)

Find the task with the given name, where name is the fully-qualified name of the task. This will search into the namespaces and return the referenced task, or nil if no such task can be found. If the name refers to a namespace, the task in that namespace named "default" will be returned instead, if one exists.

fully_qualified_name()

Returns the fully-qualified name of this namespace, or nil if the namespace is at the top-level.

namespace(name, &block)

Open a namespace in which to define new tasks. If the namespace was defined previously, it will be reopened, otherwise a new namespace will be created for the given name.

next_description(reset=false)

Returns the value set by the last, pending "desc" call. If `reset` is not false, the value will be reset immediately afterwards.

search_task(name)

Given a task name, this will search the current namespace, and all parent namespaces, looking for a task that matches the name, exactly. It returns the task, if found, or nil, if not.

task(name, options={}, &block)

Describe a new task. If a description is active (see desc), it is added to the options under the `:desc` key. The new task is added to the namespace.

task_list(all=false)

Returns the tasks in this namespace as an array of TaskDefinition objects. If a non-false parameter is given, all tasks in all namespaces under this namespace will be returned as well.

top()

Returns the top-level namespace (the one with no parent).

[Validate]