Class: Net::IRC::Mode

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

Overview

MODE <channel> *( ( “-” / “+” ) *<modes> *<modeparams> )

Constant Summary

Constants inherited from Message

Net::IRC::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(channel, *parameters) ⇒ Mode

Returns a new instance of Mode.



539
540
541
542
543
544
# File 'lib/net/irc.rb', line 539

def initialize(channel, *parameters)
  @channel = channel
  @modes = parameters.join(' ')
  
  super(nil, 'MODE', channel, *parameters)
end

Instance Attribute Details

#channelObject

Returns the value of attribute channel.



537
538
539
# File 'lib/net/irc.rb', line 537

def channel
  @channel
end

#modesObject

Returns the value of attribute modes.



537
538
539
# File 'lib/net/irc.rb', line 537

def modes
  @modes
end