Class: Net::IRC::Part

Inherits:
Message show all
Defined in:
lib/net/irc.rb

Overview

PART <channel> *( “,” <channel> ) [ <text> ]

Constant Summary

Constants inherited from Message

Message::COMMAND_MAPS

Instance Attribute Summary collapse

Attributes inherited from Message

#command, #parameters, #prefix

Instance Method Summary collapse

Methods inherited from Message

command_for_number, parse, #prefix?, #to_s, #write

Constructor Details

#initialize(channels, message = nil) ⇒ Part

Returns a new instance of Part.



574
575
576
577
578
579
580
581
582
# File 'lib/net/irc.rb', line 574

def initialize(channels, message = nil)
  @channels = channels.split(',')

  if message
    super(nil, 'PART', channels, message)
  else
    super(nil, 'PART', channels)
  end
end

Instance Attribute Details

#channelsObject

Returns the value of attribute channels.



572
573
574
# File 'lib/net/irc.rb', line 572

def channels
  @channels
end

#textObject

Returns the value of attribute text.



572
573
574
# File 'lib/net/irc.rb', line 572

def text
  @text
end