Class: PrismPay::Form

Inherits:
Object
  • Object
show all
Defined in:
lib/prismpay/webpay.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(hash) ⇒ Form

Returns a new instance of Form.



6
7
8
9
10
11
12
13
14
# File 'lib/prismpay/webpay.rb', line 6

def initialize(hash)
  # takes a hash of form {action => {formid => url}}
  # this is not ideal could come up with a much cleaner way...
  # brains resources going elsewhere for now though

  @action = hash.keys.first
  @id = hash[@action].keys.first
  @postback = hash[@action][@id]
end

Instance Attribute Details

#actionObject (readonly)

Returns the value of attribute action.



4
5
6
# File 'lib/prismpay/webpay.rb', line 4

def action
  @action
end

#idObject (readonly)

Returns the value of attribute id.



4
5
6
# File 'lib/prismpay/webpay.rb', line 4

def id
  @id
end

#postbackObject (readonly)

Returns the value of attribute postback.



4
5
6
# File 'lib/prismpay/webpay.rb', line 4

def postback
  @postback
end