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.



546
547
548
549
550
551
552
553
554
# File 'lib/net/irc.rb', line 546

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.



544
545
546
# File 'lib/net/irc.rb', line 544

def channels
  @channels
end

#textObject

Returns the value of attribute text.



544
545
546
# File 'lib/net/irc.rb', line 544

def text
  @text
end