class Irc::Bot::DataStream
The DataStream class. A DataStream is just a Hash. The :text key has a special meaning because it's the value that will be used when converting to String
Public Class Methods
new(text, hash)
click to toggle source
Create a new DataStream with text text and attributes held by hash. Either parameter can be missing; if text is missing, the text can be be defined in the hash with a :text key.
# File lib/rbot/core/utils/filters.rb, line 25 def initialize(*args) self.replace(args.pop) if Hash === args.last self[:text] = args.first if args.length > 0 end
Public Instance Methods
to_s()
click to toggle source
Returns the :text key
# File lib/rbot/core/utils/filters.rb, line 31 def to_s return self[:text] end