Class: Jabber::Bytestreams::StreamHostUsed

Inherits:
REXML::Element show all
Defined in:
lib/xmpp4r/bytestreams/iq/bytestreams.rb

Overview

<streamhost-used/> element, normally appears as child of IqQueryBytestreams

Instance Method Summary collapse

Methods inherited from REXML::Element

#delete_elements, #first_element, #first_element_text, #import, import, #replace_element_text, #typed_add

Constructor Details

#initialize(jid = nil) ⇒ StreamHostUsed

Returns a new instance of StreamHostUsed.



162
163
164
165
# File 'lib/xmpp4r/bytestreams/iq/bytestreams.rb', line 162

def initialize(jid=nil)
  super('streamhost-used')
  self.jid = jid
end

Instance Method Details

#jidObject



167
168
169
# File 'lib/xmpp4r/bytestreams/iq/bytestreams.rb', line 167

def jid
  (a = attributes['jid']) ? JID.new(a) : nil
end

#jid=(j) ⇒ Object



171
172
173
# File 'lib/xmpp4r/bytestreams/iq/bytestreams.rb', line 171

def jid=(j)
  attributes['jid'] = (j ? j.to_s : nil)
end