Class: Emissary::Agent::Ping
- Inherits:
-
Emissary::Agent
- Object
- Emissary::Agent
- Emissary::Agent::Ping
- Defined in:
- lib/emissary/agent/ping.rb
Instance Attribute Summary
Attributes inherited from Emissary::Agent
#args, #config, #message, #method, #name, #operator
Instance Method Summary collapse
Methods inherited from Emissary::Agent
#activate, #initialize, #post_init, #send
Constructor Details
This class inherits a constructor from Emissary::Agent
Instance Method Details
#ping ⇒ Object
22 23 24 25 26 27 28 29 30 |
# File 'lib/emissary/agent/ping.rb', line 22 def ping reply = .response reply.method = :pong ::Emissary.logger.debug "Received PING: originator: #{.originator}" ::Emissary.logger.debug "Sending PONG : originator: #{reply.originator}" reply end |
#pong ⇒ Object
32 33 34 35 |
# File 'lib/emissary/agent/ping.rb', line 32 def pong ::Emissary.logger.debug "Received PONG" throw :skip_implicit_response end |
#valid_methods ⇒ Object
18 19 20 |
# File 'lib/emissary/agent/ping.rb', line 18 def valid_methods [:ping, :pong] end |