Class: BBK::App::Processors::Ping

Inherits:
Base
  • Object
show all
Defined in:
lib/bbk/app/processors/ping.rb

Instance Attribute Summary

Attributes inherited from Base

#logger

Instance Method Summary collapse

Methods inherited from Base

#call, #rule

Constructor Details

#initialize(pong_message_factory, pong_route, *args, **kwargs) ⇒ Ping

Returns a new instance of Ping.



8
9
10
11
12
# File 'lib/bbk/app/processors/ping.rb', line 8

def initialize(pong_message_factory, pong_route, *args, **kwargs)
  super
  @pong_message_factory = pong_message_factory
  @pong_route = pong_route
end

Instance Method Details

#process(message, results: []) ⇒ Object



14
15
16
17
18
19
20
# File 'lib/bbk/app/processors/ping.rb', line 14

def process(message, results: [])
  results << BBK::App::Dispatcher::Result.new(
    @pong_route,
    @pong_message_factory.build(message)
  )
  results
end