Class: Irc::TopicMessage
- Inherits:
-
BasicUserMessage
- Object
- BasicUserMessage
- Irc::TopicMessage
- Defined in:
- lib/rbot/message.rb
Instance Attribute Summary collapse
-
#channel ⇒ Object
readonly
topic set on channel.
-
#info_or_set ⇒ Object
:info if topic info, :set if topic set.
-
#timestamp ⇒ Object
readonly
topic set at (unixtime).
-
#topic ⇒ Object
readonly
channel topic.
Attributes inherited from BasicUserMessage
#bot, #ignored, #in_thread, #logmessage, #message, #plainmessage, #replied, #server, #source, #target, #time
Instance Method Summary collapse
-
#initialize(bot, server, source, channel, topic = ChannelTopic.new) ⇒ TopicMessage
constructor
A new instance of TopicMessage.
- #inspect ⇒ Object
Methods inherited from BasicUserMessage
#address?, #botuser, #identified?, #parse_channel_list, #recurse_depth, #recurse_depth=, #sourceaddress, #sourcenick, strip_formatting, strip_initial_formatting, stripcolour
Constructor Details
#initialize(bot, server, source, channel, topic = ChannelTopic.new) ⇒ TopicMessage
Returns a new instance of TopicMessage.
586 587 588 589 590 591 592 |
# File 'lib/rbot/message.rb', line 586 def initialize(bot, server, source, channel, topic=ChannelTopic.new) super(bot, server, source, channel, topic.text) @topic = topic @timestamp = topic.set_on @channel = channel @info_or_set = nil end |
Instance Attribute Details
#channel ⇒ Object (readonly)
topic set on channel
582 583 584 |
# File 'lib/rbot/message.rb', line 582 def channel @channel end |
#info_or_set ⇒ Object
:info if topic info, :set if topic set
585 586 587 |
# File 'lib/rbot/message.rb', line 585 def info_or_set @info_or_set end |
#timestamp ⇒ Object (readonly)
topic set at (unixtime)
580 581 582 |
# File 'lib/rbot/message.rb', line 580 def @timestamp end |
#topic ⇒ Object (readonly)
channel topic
578 579 580 |
# File 'lib/rbot/message.rb', line 578 def topic @topic end |
Instance Method Details
#inspect ⇒ Object
594 595 596 597 598 |
# File 'lib/rbot/message.rb', line 594 def inspect fields = ' topic=' << topic fields << ' (set on ' << << ')' super(fields) end |