Class: Net::IRC::Ping
Overview
PING <server> [ <target> ]
Constant Summary
Constants inherited from Message
Instance Attribute Summary collapse
-
#server ⇒ Object
Returns the value of attribute server.
-
#target ⇒ Object
Returns the value of attribute target.
Attributes inherited from Message
#command, #parameters, #prefix
Instance Method Summary collapse
-
#initialize(server, target = nil) ⇒ Ping
constructor
A new instance of Ping.
Methods inherited from Message
command_for_number, parse, #prefix?, #to_s, #write
Constructor Details
#initialize(server, target = nil) ⇒ Ping
Returns a new instance of Ping.
572 573 574 575 576 577 578 579 580 |
# File 'lib/net/irc.rb', line 572 def initialize(server, target = nil) @server = server if @target = target super(nil, 'PING', @server, @target) else super(nil, 'PING', @server) end end |
Instance Attribute Details
#server ⇒ Object
Returns the value of attribute server.
570 571 572 |
# File 'lib/net/irc.rb', line 570 def server @server end |
#target ⇒ Object
Returns the value of attribute target.
570 571 572 |
# File 'lib/net/irc.rb', line 570 def target @target end |