Class: Irc::Bot::RemoteMessage

Inherits:
Object
  • Object
show all
Defined in:
lib/rbot/core/remote.rb

Overview

A RemoteMessage is similar to a BasicUserMessage

Instance Attribute Summary collapse

Instance Method Summary collapse

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, message)
  @bot = bot
  @source = source
  @message = message
  @time = Time.now
end

Instance Attribute Details

#botObject (readonly)

associated bot



83
84
85
# File 'lib/rbot/core/remote.rb', line 83

def bot
  @bot
end

#messageObject

contents of the message



92
93
94
# File 'lib/rbot/core/remote.rb', line 92

def message
  @message
end

#sourceObject (readonly)

remote client that originated the message



89
90
91
# File 'lib/rbot/core/remote.rb', line 89

def source
  @source
end

#timeObject (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’

Returns:

  • (Boolean)


107
108
109
# File 'lib/rbot/core/remote.rb', line 107

def private?
  true
end

#targetObject

The target of a RemoteMessage



102
103
104
# File 'lib/rbot/core/remote.rb', line 102

def target
  @bot
end