Class: PrismPay::Form
- Inherits:
-
Object
- Object
- PrismPay::Form
- Defined in:
- lib/prismpay/webpay.rb
Instance Attribute Summary collapse
-
#action ⇒ Object
readonly
Returns the value of attribute action.
-
#id ⇒ Object
readonly
Returns the value of attribute id.
-
#postback ⇒ Object
readonly
Returns the value of attribute postback.
Instance Method Summary collapse
-
#initialize(hash) ⇒ Form
constructor
A new instance of Form.
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
#action ⇒ Object (readonly)
Returns the value of attribute action.
4 5 6 |
# File 'lib/prismpay/webpay.rb', line 4 def action @action end |
#id ⇒ Object (readonly)
Returns the value of attribute id.
4 5 6 |
# File 'lib/prismpay/webpay.rb', line 4 def id @id end |
#postback ⇒ Object (readonly)
Returns the value of attribute postback.
4 5 6 |
# File 'lib/prismpay/webpay.rb', line 4 def postback @postback end |