class Irc::Channel::Topic
A Topic
represents the topic of a channel. It consists of the topic itself, who set it and when
Attributes
Public Class Methods
Source
# File lib/rbot/irc.rb, line 1286 def initialize(text="", set_by="", set_on=Time.new) @text = text @set_by = set_by.to_irc_netmask @set_on = set_on end
Create a new Topic
setting the text, the creator and the creation time
Public Instance Methods
Source
# File lib/rbot/irc.rb, line 1294 def replace(topic) raise TypeError, "#{topic.inspect} is not of class #{self.class}" unless topic.kind_of?(self.class) @text = topic.text.dup @set_by = topic.set_by.dup @set_on = topic.set_on.dup end
Replace a Topic
with another one
Source
# File lib/rbot/irc.rb, line 1303 def to_irc_channel_topic self end
Returns self