Module: Parser
- Defined in:
- lib/harvester/parser.rb
Class Method Summary collapse
Class Method Details
.activate(topic, endpoint) ⇒ Object
10 11 12 13 14 15 16 17 18 19 |
# File 'lib/harvester/parser.rb', line 10 def self.activate topic, endpoint puts topic, endpoint listener = EZMQ::Subscriber.new :connect, port: 5000, topic: topic, decode: -> m { Oj.load m } listener.listen do |, topic| data = plow , topic data.each do |item| puts @broadcaster.send item, topic: topic end end end |
.plow(message, parse) ⇒ Object
21 22 23 |
# File 'lib/harvester/parser.rb', line 21 def self.plow , parse send(parse, ) end |