Class: PostData
Direct Known Subclasses
MerbMerchant::Billing::PlugnpayGateway::PlugnpayPostData, MerbMerchant::Billing::SecurePayTechGateway::SecurePayTechPostData, MerbMerchant::Billing::VerifiGateway::VerifiPostData
Instance Method Summary collapse
- #[]=(key, value) ⇒ Object
- #to_post_data ⇒ Object (also: #to_s)
Methods inherited from Hash
#stringify_keys, #stringify_keys!, #symbolize_keys, #symbolize_keys!
Instance Method Details
#[]=(key, value) ⇒ Object
7 8 9 10 |
# File 'lib/merb_merchant/lib/post_data.rb', line 7 def []=(key, value) return if value.blank? && !required?(key) super end |
#to_post_data ⇒ Object Also known as: to_s
12 13 14 |
# File 'lib/merb_merchant/lib/post_data.rb', line 12 def to_post_data collect { |key, value| "#{key}=#{CGI.escape(value.to_s)}" }.join("&") end |