Sha256: fe6c7cff718190ecac1731b05a67785f675d3f695cf192df9473cbbfcac51bc3

Contents?: true

Size: 321 Bytes

Versions: 1

Compression:

Stored size: 321 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

1 entries across 1 versions & 1 rubygems

Version Path
openpay-1.0.4 lib/openpay/open_pay_resource_factory.rb