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

Module | Capistrano::Configuration::Loading::ClassMethods
In: | lib/capistrano/configuration/loading.rb lib/capistrano/configuration/loading.rb

### Methods

current_feature current_feature current_feature= current_feature= instance instance instance= instance= recipes_per_feature recipes_per_feature

### Public Instance methods

current_feature()

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

[Source]

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

current_feature()

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

[Source]

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

current_feature=(feature)

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.

[Source]

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

current_feature=(feature)

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.

[Source]

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

instance(require_config=false)

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.

[Source]

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

instance(require_config=false)

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.

[Source]

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

instance=(config)

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

[Source]

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

instance=(config)

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

[Source]

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

recipes_per_feature()

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.

[Source]

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

recipes_per_feature()

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.

[Source]

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

[Validate]