Class: Raibo::Message
- Inherits:
-
Object
- Object
- Raibo::Message
- Defined in:
- lib/raibo/message.rb
Instance Attribute Summary collapse
-
#body ⇒ Object
readonly
Readers for higher-level attributes of the message.
-
#from ⇒ Object
readonly
Readers for higher-level attributes of the message.
-
#kind ⇒ Object
readonly
Readers for higher-level attributes of the message.
-
#middle ⇒ Object
readonly
Readers for the components of the actual IRC protocol line.
-
#prefix ⇒ Object
readonly
Readers for the components of the actual IRC protocol line.
-
#to ⇒ Object
readonly
Readers for higher-level attributes of the message.
-
#trailing ⇒ Object
readonly
Readers for the components of the actual IRC protocol line.
-
#type ⇒ Object
readonly
Readers for the components of the actual IRC protocol line.
Instance Method Summary collapse
-
#initialize(line) ⇒ Message
constructor
A new instance of Message.
Constructor Details
#initialize(line) ⇒ Message
Returns a new instance of Message.
9 10 11 12 13 14 15 16 |
# File 'lib/raibo/message.rb', line 9 def initialize(line) @prefix, @type, @middle, @trailing = parse_line(line) @kind = get_kind @from = get_from @to = get_to @body = get_body end |
Instance Attribute Details
#body ⇒ Object (readonly)
Readers for higher-level attributes of the message.
7 8 9 |
# File 'lib/raibo/message.rb', line 7 def body @body end |
#from ⇒ Object (readonly)
Readers for higher-level attributes of the message.
7 8 9 |
# File 'lib/raibo/message.rb', line 7 def from @from end |
#kind ⇒ Object (readonly)
Readers for higher-level attributes of the message.
7 8 9 |
# File 'lib/raibo/message.rb', line 7 def kind @kind end |
#middle ⇒ Object (readonly)
Readers for the components of the actual IRC protocol line.
4 5 6 |
# File 'lib/raibo/message.rb', line 4 def middle @middle end |
#prefix ⇒ Object (readonly)
Readers for the components of the actual IRC protocol line.
4 5 6 |
# File 'lib/raibo/message.rb', line 4 def prefix @prefix end |
#to ⇒ Object (readonly)
Readers for higher-level attributes of the message.
7 8 9 |
# File 'lib/raibo/message.rb', line 7 def to @to end |
#trailing ⇒ Object (readonly)
Readers for the components of the actual IRC protocol line.
4 5 6 |
# File 'lib/raibo/message.rb', line 4 def trailing @trailing end |
#type ⇒ Object (readonly)
Readers for the components of the actual IRC protocol line.
4 5 6 |
# File 'lib/raibo/message.rb', line 4 def type @type end |