Class: MingleEvents::Processors::HttpPostPublisher

Inherits:
Processor
  • Object
show all
Defined in:
lib/mingle_events/processors/http_post_publisher.rb

Instance Method Summary collapse

Methods inherited from Processor

#process_events

Constructor Details

#initialize(url) ⇒ HttpPostPublisher

Returns a new instance of HttpPostPublisher.



6
7
8
# File 'lib/mingle_events/processors/http_post_publisher.rb', line 6

def initialize(url)
  @url = url
end

Instance Method Details

#process(event) ⇒ Object



10
11
12
# File 'lib/mingle_events/processors/http_post_publisher.rb', line 10

def process(event) 
  Net::HTTP.post_form(URI.parse(@url), {'event' => event.raw_xml}).body
end