module DPL::Provider::Heroku

Public Instance Methods

new(context, options) click to toggle source
# File lib/dpl/provider/heroku.rb, line 10
def new(context, options)
  strategy = options[:strategy] || 'api'
  constant = constants.detect { |c| c.to_s.downcase == strategy.downcase.gsub(/\W/, '') }
  raise Error, 'unknown strategy %p' % strategy unless constant and constant != Generic
  const_get(constant).new(context, options)
end