Class: IRCSupport::Message::CAP
- Inherits:
-
IRCSupport::Message
- Object
- IRCSupport::Message
- IRCSupport::Message::CAP
- Defined in:
- lib/ircsupport/message.rb
Direct Known Subclasses
Defined Under Namespace
Instance Attribute Summary collapse
-
#multipart ⇒ Boolean
Will be true if this is a multipart reply.
-
#reply ⇒ String
The text of the CAP reply.
-
#subcommand ⇒ String
The CAP subcommand.
Attributes inherited from IRCSupport::Message
Instance Method Summary collapse
-
#initialize(args) ⇒ CAP
constructor
A new instance of CAP.
Methods inherited from IRCSupport::Message
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
#multipart ⇒ Boolean
Returns Will be true if this is a multipart reply.
470 471 472 |
# File 'lib/ircsupport/message.rb', line 470 def multipart @multipart end |
#reply ⇒ String
Returns The text of the CAP reply.
473 474 475 |
# File 'lib/ircsupport/message.rb', line 473 def reply @reply end |
#subcommand ⇒ String
Returns The CAP subcommand.
467 468 469 |
# File 'lib/ircsupport/message.rb', line 467 def subcommand @subcommand end |