Methods

Files

Class/Module Index [+]

Quicksearch

Capistrano::Deploy::Strategy

Public Class Methods

new(strategy, config={}) click to toggle source
# File lib/capistrano/recipes/deploy/strategy.rb, line 4
def self.new(strategy, config={})
  strategy_file = "capistrano/recipes/deploy/strategy/#{strategy}"
  require(strategy_file)

  strategy_const = strategy.to_s.capitalize.gsub(/_(.)/) { $1.upcase }
  if const_defined?(strategy_const)
    const_get(strategy_const).new(config)
  else
    raise Capistrano::Error, "could not find `#{name}::#{strategy_const}' in `#{strategy_file}'"
  end
rescue LoadError
  raise Capistrano::Error, "could not find any strategy named `#{strategy}'"
end

[Validate]

Generated with the Darkfish Rdoc Generator 2.