Module: Capistrano::Configuration::Loading

### Home Classes Methods

### In Files

- lib/capistrano/configuration/loading.rb

### Namespace

- MODULE Capistrano::Configuration::Loading::ClassMethods

### Methods

- #file_in_load_path?
- #load

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

### Attributes

load_paths[R]

The load paths used for locating recipe files.

### Public Instance Methods

file_in_load_path?(file) click to toggle source

    # File lib/capistrano/configuration/loading.rb, line 166
    def file_in_load_path?(file)
      begin
        !!find_file_in_load_path(file)
      rescue LoadError
        false
      end
    end

load(*args, &block) click to toggle source

Load a configuration file or string into this configuration.

Usage:

    load("recipe"):
      Look for and load the contents of 'recipe.rb' into this
      configuration.

    load(:file => "recipe"):
      same as above

    load(:string => "set :scm, :subversion"):
      Load the given string as a configuration specification.

    load { ... }
      Load the block in the context of the configuration.

    # File lib/capistrano/configuration/loading.rb, line 78
    def load(*args, &block)
      options = args.last.is_a?(Hash) ? args.pop : {}

      if block
        raise ArgumentError, "loading a block requires 0 arguments" unless options.empty? && args.empty?
        load(:proc => block)

      elsif args.any?
        args.each { |arg| load options.merge(:file => arg) }

      elsif options[:file]
        load_from_file(options[:file], options[:name])

      elsif options[:string]
        remember_load(options) unless options[:reloading]
        instance_eval(options[:string], options[:name] || "<eval>")

      elsif options[:proc]
        remember_load(options) unless options[:reloading]
        instance_eval(&options[:proc])

      else
        raise ArgumentError, "don't know how to load #{options.inspect}"
      end
    end

[Validate]

Generated with the Darkfish Rdoc Generator 2.