Sha256: 7fc1de76128c85a01c1f83ef2f1f08600610ac65f6359cf3cc76ad8065124f35

Contents?: true

Size: 324 Bytes

Versions: 6

Compression:

Stored size: 324 Bytes

Contents

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

Version data entries

6 entries across 4 versions & 1 rubygems

Version Path
openpay-1.0.3 lib/OpenPay/open_pay_resource_factory.rb
openpay-1.0.3 lib/openpay/open_pay_resource_factory.rb
openpay-1.0.2 lib/OpenPay/open_pay_resource_factory.rb
openpay-1.0.2 lib/openpay/open_pay_resource_factory.rb
openpay-1.0.1 lib/OpenPay/open_pay_resource_factory.rb
openpay-0.9.8 lib/OpenPay/open_pay_resource_factory.rb