Class: ActiveMerchant::PostData
- Inherits:
-
Hash
- Object
- Hash
- ActiveMerchant::PostData
- Defined in:
- lib/active_utils/common/post_data.rb
Instance Method Summary collapse
- #[]=(key, value) ⇒ Object
- #to_post_data ⇒ Object (also: #to_s)
Instance Method Details
#[]=(key, value) ⇒ Object
8 9 10 11 |
# File 'lib/active_utils/common/post_data.rb', line 8 def []=(key, value) return if value.blank? && !required?(key) super end |
#to_post_data ⇒ Object Also known as: to_s
13 14 15 |
# File 'lib/active_utils/common/post_data.rb', line 13 def to_post_data collect { |key, value| "#{key}=#{CGI.escape(value.to_s)}" }.join("&") end |