Class ::Bot::DataStream
In: lib/rbot/core/utils/filters.rb
Parent: Hash
User HTTPResponse BasicUserMessage Bot\n[lib/rbot/core/remote.rb\nlib/rbot/core/utils/extends.rb\nlib/rbot/core/utils/filters.rb\nlib/rbot/core/utils/wordlist.rb] HttpUtil lib/rbot/core/userdata.rb lib/rbot/core/utils/httputil.rb lib/rbot/core/utils/extends.rb lib/rbot/core/remote.rb lib/rbot/core/utils/httputil.rb ParseTime Utils (null) dot/m_15_0.png

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

Methods

new   to_s  

Public Class methods

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.

[Source]

    # 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

Public Instance methods

Returns the :text key

[Source]

    # File lib/rbot/core/utils/filters.rb, line 31
31:       def to_s
32:         return self[:text]
33:       end

[Validate]