Class: Flexo::Events::PingEvent

Inherits:
Flexo::Event show all
Defined in:
lib/flexo/events/ping.rb

Instance Attribute Summary collapse

Attributes inherited from Flexo::Event

#data, #nickname

Instance Method Summary collapse

Methods inherited from Flexo::Event

#me?

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

#serverObject (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

#pongObject



11
12
13
# File 'lib/flexo/events/ping.rb', line 11

def pong
  @manager.sender.pong(@server)
end