Module: Capistrano::Configuration::Loading::ClassMethods

### Home Classes Methods

### In Files

- lib/capistrano/configuration/loading.rb

### Methods

- #current_feature
- #current_feature=
- #instance
- #instance=
- #recipes_per_feature

### Files

- help.txt

### Class/Module Index

Quicksearch

- Capistrano
- Capistrano::CLI
- Capistrano::CLI::Execute
- Capistrano::CLI::Execute::ClassMethods
- Capistrano::CLI::Help
- Capistrano::CLI::Options
- Capistrano::CLI::Options::ClassMethods
- Capistrano::CLI::UI
- Capistrano::CLI::UI::ClassMethods
- Capistrano::Callback
- Capistrano::Command
- Capistrano::Command::Tree
- Capistrano::Command::Tree::Branch
- Capistrano::Command::Tree::ConditionBranch
- Capistrano::Command::Tree::ConditionBranch::Evaluator
- Capistrano::Command::Tree::ElseBranch
- Capistrano::Configuration
- Capistrano::Configuration::Actions
- Capistrano::Configuration::Actions::FileTransfer
- Capistrano::Configuration::Actions::Inspect
- Capistrano::Configuration::Actions::Invocation
- Capistrano::Configuration::Actions::Invocation::ClassMethods
- Capistrano::Configuration::AliasTask
- Capistrano::Configuration::Callbacks
- Capistrano::Configuration::Connections
- Capistrano::Configuration::Execution
- Capistrano::Configuration::Loading
- Capistrano::Configuration::Loading::ClassMethods
- Capistrano::Configuration::LogFormatters
- Capistrano::Configuration::Namespaces
- Capistrano::Configuration::Namespaces::Namespace
- Capistrano::Configuration::Roles
- Capistrano::Configuration::Servers
- Capistrano::Configuration::Variables
- Capistrano::Deploy
- Capistrano::Deploy::Dependencies
- Capistrano::Deploy::LocalDependency
- Capistrano::Deploy::RemoteDependency
- Capistrano::Deploy::SCM
- Capistrano::Deploy::SCM::Accurev
- Capistrano::Deploy::SCM::Accurev::InternalRevision
- Capistrano::Deploy::SCM::Base
- Capistrano::Deploy::SCM::Base::LocalProxy
- Capistrano::Deploy::SCM::Bzr
- Capistrano::Deploy::SCM::Cvs
- Capistrano::Deploy::SCM::Darcs
- Capistrano::Deploy::SCM::Git
- Capistrano::Deploy::SCM::Mercurial
- Capistrano::Deploy::SCM::None
- Capistrano::Deploy::SCM::Perforce
- Capistrano::Deploy::SCM::Subversion
- Capistrano::Deploy::Strategy
- Capistrano::Deploy::Strategy::Base
- Capistrano::Deploy::Strategy::Checkout
- Capistrano::Deploy::Strategy::Copy
- Capistrano::Deploy::Strategy::Export
- Capistrano::Deploy::Strategy::Remote
- Capistrano::Deploy::Strategy::RemoteCache
- Capistrano::Deploy::Strategy::UnsharedRemoteCache
- Capistrano::ProcCallback
- Capistrano::Processable
- Capistrano::Processable::SessionAssociation
- Capistrano::RemoteError
- Capistrano::Role
- Capistrano::Role::DynamicServerList
- Capistrano::SSH
- Capistrano::ServerDefinition
- Capistrano::Shell
- Capistrano::TaskCallback
- Capistrano::TaskDefinition
- Capistrano::Transfer
- Capistrano::Transfer::SFTPTransferWrapper
- Capistrano::Version
- Kernel
- Object
- String

No matching classes.

# Capistrano::Configuration::Loading::ClassMethods

### Public Instance Methods

current_feature() click to toggle source

Used internally to determine what the current "feature" being required is. This is used to track which files load which recipes via require.

    # File lib/capistrano/configuration/loading.rb, line 39
    def current_feature
      Thread.current[:capistrano_current_feature]
    end

current_feature=(feature) click to toggle source

Used internally to specify the current file being required, so that any recipes loaded by that file can be remembered. This allows recipes loaded via require to be correctly reloaded in different Configuration instances in the same Ruby instance.

    # File lib/capistrano/configuration/loading.rb, line 47
    def current_feature=(feature)
      Thread.current[:capistrano_current_feature] = feature
    end

instance(require_config=false) click to toggle source

Used by third-party task bundles to identify the capistrano configuration that is loading them. Its return value is not reliable in other contexts. If `require_config` is not false, an exception will be raised if the current configuration is not set.

    # File lib/capistrano/configuration/loading.rb, line 15
    def instance(require_config=false)
      config = Thread.current[:capistrano_configuration]
      if require_config && config.nil?
        raise LoadError, "Please require this file from within a Capistrano recipe"
      end
      config
    end

instance=(config) click to toggle source

Used internally by Capistrano to specify the current configuration before loading a third-party task bundle.

    # File lib/capistrano/configuration/loading.rb, line 25
    def instance=(config)
      Thread.current[:capistrano_configuration] = config
    end

recipes_per_feature() click to toggle source

Used internally by Capistrano to track which recipes have been loaded via require, so that they may be successfully reloaded when require is called again.

    # File lib/capistrano/configuration/loading.rb, line 32
    def recipes_per_feature
      @recipes_per_feature ||= {}
    end

[Validate]

Generated with the Darkfish Rdoc Generator 2.