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

Methods

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

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.

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 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.

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

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.

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

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.

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.

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.

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

[Validate]