Class: Flexo::Events::ReplyEvent
- Inherits:
-
Flexo::Event
- Object
- Flexo::Event
- Flexo::Events::ReplyEvent
- Defined in:
- lib/flexo/events/reply.rb
Overview
A numeric reply of some kind.
Defined Under Namespace
Instance Attribute Summary collapse
-
#mynickname ⇒ Object
(also: #mynick)
readonly
Returns the value of attribute mynickname.
-
#numeric ⇒ Object
readonly
Returns the value of attribute numeric.
-
#reply ⇒ Object
(also: #struct)
readonly
Returns the value of attribute reply.
-
#text ⇒ Object
readonly
Returns the value of attribute text.
Attributes inherited from Flexo::Event
Class Method Summary collapse
Instance Method Summary collapse
-
#initialize(*args) ⇒ ReplyEvent
constructor
A new instance of ReplyEvent.
Methods inherited from Flexo::Event
Constructor Details
#initialize(*args) ⇒ ReplyEvent
Returns a new instance of ReplyEvent.
15 16 17 18 19 20 21 22 |
# File 'lib/flexo/events/reply.rb', line 15 def initialize(*args) super @mynickname = @data.params[0] @numeric = @data..to_i @text = @data.string @is_error = @numeric >= 400 @reply = Struct.new end |
Instance Attribute Details
#mynickname ⇒ Object (readonly) Also known as: mynick
Returns the value of attribute mynickname.
7 8 9 |
# File 'lib/flexo/events/reply.rb', line 7 def mynickname @mynickname end |
#numeric ⇒ Object (readonly)
Returns the value of attribute numeric.
8 9 10 |
# File 'lib/flexo/events/reply.rb', line 8 def numeric @numeric end |
#reply ⇒ Object (readonly) Also known as: struct
Returns the value of attribute reply.
10 11 12 |
# File 'lib/flexo/events/reply.rb', line 10 def reply @reply end |
#text ⇒ Object (readonly)
Returns the value of attribute text.
9 10 11 |
# File 'lib/flexo/events/reply.rb', line 9 def text @text end |