Class: Astrotrain::Mapping::HttpPost
- Defined in:
- lib/astrotrain/mapping/http_post.rb
Instance Attribute Summary
Attributes inherited from Transport
Instance Method Summary collapse
Methods inherited from Transport
inherited, #initialize, process
Constructor Details
This class inherits a constructor from Astrotrain::Mapping::Transport
Instance Method Details
#fields ⇒ Object
9 10 11 12 13 14 15 |
# File 'lib/astrotrain/mapping/http_post.rb', line 9 def fields super @message..each_with_index do |att, index| @fields[:"attachments_#{index}"] = att end @fields end |
#process ⇒ Object
4 5 6 7 |
# File 'lib/astrotrain/mapping/http_post.rb', line 4 def process return unless Transport.processing RestClient.post @mapping.destination, fields.merge(:emails => fields[:emails].join(",")) end |