Sha256: f58c7dad24302226b830571badbea7017bbe3002dfe6eda3340dc8def666df05

Contents?: true

Size: 337 Bytes

Versions: 8

Compression:

Stored size: 337 Bytes

Contents

class OpenPayResourceFactory
  def OpenPayResourceFactory::create(resource,merchant_id,private_key,production,timeout)
    begin
      Object.const_get(resource.capitalize).new(merchant_id,private_key,production,timeout)
    rescue NameError
      raise OpenpayException.new("Invalid resource name:#{resource}",false)
    end
  end
end

Version data entries

8 entries across 8 versions & 1 rubygems

Version Path
openpay-2.0.1 lib/openpay/open_pay_resource_factory.rb
openpay-2.0.0 lib/openpay/open_pay_resource_factory.rb
openpay-2.0.0b lib/openpay/open_pay_resource_factory.rb
openpay-1.0.10 lib/openpay/open_pay_resource_factory.rb
openpay-1.0.8 lib/openpay/open_pay_resource_factory.rb
openpay-1.0.7 lib/openpay/open_pay_resource_factory.rb
openpay-1.0.6 lib/openpay/open_pay_resource_factory.rb
openpay-1.0.5 lib/openpay/open_pay_resource_factory.rb