Class: IRCSupport::Message::Numeric
- Inherits:
-
IRCSupport::Message
- Object
- IRCSupport::Message
- IRCSupport::Message::Numeric
- Defined in:
- lib/ircsupport/message.rb
Direct Known Subclasses
Instance Attribute Summary collapse
-
#name ⇒ String
The name of the IRC command numeric (e.g. RPL_WELCOME).
Attributes inherited from IRCSupport::Message
Instance Method Summary collapse
-
#initialize(args) ⇒ Numeric
constructor
A new instance of Numeric.
-
#is_error? ⇒ Boolean
Will be true if this is an error numeric.
Methods inherited from IRCSupport::Message
Constructor Details
#initialize(args) ⇒ Numeric
Returns a new instance of Numeric.
36 37 38 39 40 |
# File 'lib/ircsupport/message.rb', line 36 def initialize(args) super(args) @name = IRCSupport::Numerics.numeric_to_name(@command) @type = @command.to_sym end |
Instance Attribute Details
#name ⇒ String
Returns The name of the IRC command numeric (e.g. RPL_WELCOME).
33 34 35 |
# File 'lib/ircsupport/message.rb', line 33 def name @name end |
Instance Method Details
#is_error? ⇒ Boolean
Returns Will be true if this is an error numeric.
43 44 45 |
# File 'lib/ircsupport/message.rb', line 43 def is_error? return @name =~ /^ERR/ ? true : false end |