Class: Jabber::Bytestreams::StreamHostUsed

Inherits:
XMPPElement show all
Defined in:
lib/gems/xmpp4r-0.4/lib/xmpp4r/bytestreams/iq/bytestreams.rb

Overview

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

Instance Method Summary collapse

Methods inherited from XMPPElement

class_for_name_xmlns, #clone, force_xmlns, force_xmlns?, import, name_xmlns, name_xmlns_for_class, #parent=, #set_xml_lang, #typed_add, #xml_lang, #xml_lang=

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.



156
157
158
159
# File 'lib/gems/xmpp4r-0.4/lib/xmpp4r/bytestreams/iq/bytestreams.rb', line 156

def initialize(jid=nil)
  super()
  self.jid = jid
end

Instance Method Details

#jidObject



161
162
163
# File 'lib/gems/xmpp4r-0.4/lib/xmpp4r/bytestreams/iq/bytestreams.rb', line 161

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

#jid=(j) ⇒ Object



165
166
167
# File 'lib/gems/xmpp4r-0.4/lib/xmpp4r/bytestreams/iq/bytestreams.rb', line 165

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