Class: Rubot::Irc::Message
Overview
Represents an IRC message.
Instance Attribute Summary collapse
-
#alias ⇒ Object
If the message was used to invoke a command, this will be the command name.
-
#authenticated ⇒ Object
If the user that sent this message is authenticated, this will be true.
-
#body ⇒ Object
The body of the message.
-
#destination ⇒ Object
The location where the reply to this message should be sent.
-
#from ⇒ Object
readonly
The user that sent this message.
Instance Method Summary collapse
-
#initialize(from, destination, body) ⇒ Message
constructor
Initializes a new object with the given from, destination, and body.
Constructor Details
#initialize(from, destination, body) ⇒ Message
Initializes a new object with the given from, destination, and body.
Parameters
- from<String>
-
The nick who sent the message
- destination<String>
-
The destination where the reply to this message should be sent.
- body<String>
-
The body of the message
27 28 29 30 31 |
# File 'lib/irc/message.rb', line 27 def initialize(from, destination, body) @from = from @destination = destination @body = body end |
Instance Attribute Details
#alias ⇒ Object
If the message was used to invoke a command, this will be the command name.
13 14 15 |
# File 'lib/irc/message.rb', line 13 def alias @alias end |
#authenticated ⇒ Object
If the user that sent this message is authenticated, this will be true.
16 17 18 |
# File 'lib/irc/message.rb', line 16 def authenticated @authenticated end |
#body ⇒ Object
The body of the message.
10 11 12 |
# File 'lib/irc/message.rb', line 10 def body @body end |
#destination ⇒ Object
The location where the reply to this message should be sent. This defaults to the source of the message
7 8 9 |
# File 'lib/irc/message.rb', line 7 def destination @destination end |
#from ⇒ Object (readonly)
The user that sent this message.
19 20 21 |
# File 'lib/irc/message.rb', line 19 def from @from end |