Class: IRCSupport::Message::CTCP
- Inherits:
-
Message
- Object
- IRCSupport::Message
- Message
- IRCSupport::Message::CTCP
- Defined in:
- lib/ircsupport/message.rb
Direct Known Subclasses
Instance Attribute Summary collapse
-
#ctcp_args ⇒ String
The arguments to the CTCP.
-
#ctcp_type ⇒ String
The type of the CTCP message.
Attributes inherited from Message
Attributes inherited from IRCSupport::Message
Instance Method Summary collapse
-
#initialize(args) ⇒ CTCP
constructor
A new instance of CTCP.
Methods inherited from Message
Methods inherited from IRCSupport::Message
Constructor Details
#initialize(args) ⇒ CTCP
Returns a new instance of CTCP.
593 594 595 596 597 598 599 600 601 602 603 |
# File 'lib/ircsupport/message.rb', line 593 def initialize(args) super(args) @sender = args[:prefix] @ctcp_args = args[:args][1] @ctcp_type = args[:ctcp_type].downcase.to_sym @type = "ctcp_#@ctcp_type".to_sym if args[:is_public] @channel = args[:args][0].split(/,/).first end end |
Instance Attribute Details
#ctcp_args ⇒ String
Returns The arguments to the CTCP.
590 591 592 |
# File 'lib/ircsupport/message.rb', line 590 def ctcp_args @ctcp_args end |
#ctcp_type ⇒ String
Returns The type of the CTCP message.
587 588 589 |
# File 'lib/ircsupport/message.rb', line 587 def ctcp_type @ctcp_type end |