Module: OshparkStringExtensions
- Included in:
- String
- Defined in:
- lib/oshpark/ext.rb
Instance Method Summary collapse
Instance Method Details
#to_multipart(key) ⇒ Object
33 34 35 36 |
# File 'lib/oshpark/ext.rb', line 33 def to_multipart key "Content-Disposition: form-data; name=\"#{key}\"\r\n\r\n" + "#{self}\r\n" end |
#to_query(key = nil) ⇒ Object
38 39 40 |
# File 'lib/oshpark/ext.rb', line 38 def to_query key = nil key ? URI.escape("#{key}=#{self}") : URI.escape(self) end |