Class | ::Bot::DataStream |
In: |
lib/rbot/core/utils/filters.rb
|
Parent: | Hash |
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
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 25: def initialize(*args) 26: self.replace(args.pop) if Hash === args.last 27: self[:text] = args.first if args.length > 0 28: end