Module: DPL::Provider::Heroku

Extended by:
Heroku
Included in:
Heroku
Defined in:
lib/dpl/provider/heroku.rb,
lib/dpl/provider/heroku/api.rb,
lib/dpl/provider/heroku/git.rb,
lib/dpl/provider/heroku/anvil.rb,
lib/dpl/provider/heroku/git_deploy_key.rb

Defined Under Namespace

Classes: API, Anvil, Git, GitDeployKey

Instance Method Summary collapse

Instance Method Details

#new(context, options) ⇒ Object

Raises:



11
12
13
14
15
16
# File 'lib/dpl/provider/heroku.rb', line 11

def new(context, options)
  strategy = options[:strategy] || 'anvil'
  constant = constants.detect { |c| c.to_s.downcase == strategy }
  raise Error, 'unknown strategy %p' % strategy unless constant
  const_get(constant).new(context, options)
end