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, #prefixed?, #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.
663 664 665 666 667 668 669 |
# File 'lib/rbot/message.rb', line 663 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
659 660 661 |
# File 'lib/rbot/message.rb', line 659 def channel @channel end |
#info_or_set ⇒ Object
:info if topic info, :set if topic set
662 663 664 |
# File 'lib/rbot/message.rb', line 662 def info_or_set @info_or_set end |
#timestamp ⇒ Object (readonly)
topic set at (unixtime)
657 658 659 |
# File 'lib/rbot/message.rb', line 657 def @timestamp end |
#topic ⇒ Object (readonly)
channel topic
655 656 657 |
# File 'lib/rbot/message.rb', line 655 def topic @topic end |
Instance Method Details
#inspect ⇒ Object
671 672 673 674 675 |
# File 'lib/rbot/message.rb', line 671 def inspect fields = ' topic=' << topic fields << ' (set on ' << << ')' super(fields) end |