Module: DPL::Provider::Heroku

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

Defined Under Namespace

Classes: Anvil, Git

Instance Method Summary collapse

Instance Method Details

#new(context, options) ⇒ Object

Raises:



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

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