Class: IRCSupport::Message::CAP

Inherits:
IRCSupport::Message show all
Defined in:
lib/ircsupport/message.rb

Direct Known Subclasses

LS

Defined Under Namespace

Classes: ACK, LIST, LS

Instance Attribute Summary collapse

Attributes inherited from IRCSupport::Message

#args, #command, #prefix

Instance Method Summary collapse

Methods inherited from IRCSupport::Message

#type

Constructor Details

#initialize(args) ⇒ CAP

Returns a new instance of CAP.



476
477
478
479
480
481
482
483
484
485
486
487
# File 'lib/ircsupport/message.rb', line 476

def initialize(args)
  super(args)
  @subcommand = args[:args][0]
  @type = "cap_#{@subcommand.downcase}".to_sym
  if args[:args][1] == '*'
    @multipart = true
    @reply = args[:args][2]
  else
    @multipart = false
    @reply = args[:args][1]
  end
end

Instance Attribute Details

#multipartBoolean

Returns Will be true if this is a multipart reply.

Returns:

  • (Boolean)

    Will be true if this is a multipart reply.



470
471
472
# File 'lib/ircsupport/message.rb', line 470

def multipart
  @multipart
end

#replyString

Returns The text of the CAP reply.

Returns:

  • (String)

    The text of the CAP reply.



473
474
475
# File 'lib/ircsupport/message.rb', line 473

def reply
  @reply
end

#subcommandString

Returns The CAP subcommand.

Returns:

  • (String)

    The CAP subcommand.



467
468
469
# File 'lib/ircsupport/message.rb', line 467

def subcommand
  @subcommand
end