Class: Jabber::Bytestreams::IBBQueueItem
- Inherits:
-
Object
- Object
- Jabber::Bytestreams::IBBQueueItem
- Defined in:
- lib/xmpp4r/bytestreams/helper/ibb/base.rb
Overview
Represents an item in the internal data queue
Instance Attribute Summary (collapse)
-
- (Object) seq
readonly
Returns the value of attribute seq.
-
- (Object) type
readonly
Returns the value of attribute type.
Instance Method Summary (collapse)
-
- (Object) data
Return the Base64-decoded data.
-
- (IBBQueueItem) initialize(type, seq = nil, data_text = '')
constructor
A new instance of IBBQueueItem.
Constructor Details
- (IBBQueueItem) initialize(type, seq = nil, data_text = '')
A new instance of IBBQueueItem
237 238 239 240 241 242 243 244 245 |
# File 'lib/xmpp4r/bytestreams/helper/ibb/base.rb', line 237 def initialize(type, seq=nil, data_text='') unless [:data, :close].include? type raise "Unknown IBBQueueItem type: #{type}" end @type = type @seq = seq @data = data_text end |
Instance Attribute Details
- (Object) seq (readonly)
Returns the value of attribute seq
236 237 238 |
# File 'lib/xmpp4r/bytestreams/helper/ibb/base.rb', line 236 def seq @seq end |
- (Object) type (readonly)
Returns the value of attribute type
236 237 238 |
# File 'lib/xmpp4r/bytestreams/helper/ibb/base.rb', line 236 def type @type end |
Instance Method Details
- (Object) data
Return the Base64-decoded data
There's no need to catch Exceptions here, as none are thrown.
252 253 254 |
# File 'lib/xmpp4r/bytestreams/helper/ibb/base.rb', line 252 def data Base64::decode64(@data) end |