Class: Flexo::Events::PingEvent
- Inherits:
-
Flexo::Event
- Object
- Flexo::Event
- Flexo::Events::PingEvent
- Defined in:
- lib/flexo/events/ping.rb
Instance Attribute Summary collapse
-
#server ⇒ Object
readonly
Returns the value of attribute server.
Attributes inherited from Flexo::Event
Instance Method Summary collapse
-
#initialize(*args) ⇒ PingEvent
constructor
A new instance of PingEvent.
- #pong ⇒ Object
Methods inherited from Flexo::Event
Constructor Details
#initialize(*args) ⇒ PingEvent
Returns a new instance of PingEvent.
6 7 8 9 |
# File 'lib/flexo/events/ping.rb', line 6 def initialize(*args) super @server = @data.params[0] || @data.string end |
Instance Attribute Details
#server ⇒ Object (readonly)
Returns the value of attribute server.
4 5 6 |
# File 'lib/flexo/events/ping.rb', line 4 def server @server end |
Instance Method Details
#pong ⇒ Object
11 12 13 |
# File 'lib/flexo/events/ping.rb', line 11 def pong @manager.sender.pong(@server) end |