Class: Irc::Bot::RemoteMessage
Overview
A RemoteMessage is similar to a BasicUserMessage
Instance Attribute Summary collapse
-
#bot ⇒ Object
readonly
associated bot.
-
#message ⇒ Object
contents of the message.
-
#source ⇒ Object
readonly
remote client that originated the message.
-
#time ⇒ Object
readonly
when the message was received.
Instance Method Summary collapse
-
#initialize(bot, source, message) ⇒ RemoteMessage
constructor
A new instance of RemoteMessage.
-
#private? ⇒ Boolean
Remote messages are always ‘private’.
-
#target ⇒ Object
The target of a RemoteMessage.
Constructor Details
#initialize(bot, source, message) ⇒ RemoteMessage
Returns a new instance of RemoteMessage.
94 95 96 97 98 99 |
# File 'lib/rbot/core/remote.rb', line 94 def initialize(bot, source, ) @bot = bot @source = source @message = @time = Time.now end |
Instance Attribute Details
#bot ⇒ Object (readonly)
associated bot
83 84 85 |
# File 'lib/rbot/core/remote.rb', line 83 def bot @bot end |
#message ⇒ Object
contents of the message
92 93 94 |
# File 'lib/rbot/core/remote.rb', line 92 def @message end |
#source ⇒ Object (readonly)
remote client that originated the message
89 90 91 |
# File 'lib/rbot/core/remote.rb', line 89 def source @source end |
#time ⇒ Object (readonly)
when the message was received
86 87 88 |
# File 'lib/rbot/core/remote.rb', line 86 def time @time end |
Instance Method Details
#private? ⇒ Boolean
Remote messages are always ‘private’
107 108 109 |
# File 'lib/rbot/core/remote.rb', line 107 def private? true end |
#target ⇒ Object
The target of a RemoteMessage
102 103 104 |
# File 'lib/rbot/core/remote.rb', line 102 def target @bot end |