Class: Jabber::Discovery::Feature

Inherits:
XMPPElement show all
Defined in:
lib/xmpp4r/discovery/iq/discoinfo.rb

Overview

Service Discovery feature to add() to IqQueryDiscoInfo

Please note that JEP 0030 requires var to be set, for a reference see: www.xmpp.org/registrar/disco-features.html

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, #each_elements, #first_element, #first_element_content, #first_element_text, #import, import, #replace_element_content, #replace_element_text, #typed_add

Constructor Details

#initialize(var = nil) ⇒ Feature

Create a new <feature/> element

var
String

New var



181
182
183
184
# File 'lib/xmpp4r/discovery/iq/discoinfo.rb', line 181

def initialize(var=nil)
  super()
  set_var(var)
end

Instance Method Details

#set_var(val) ⇒ Object

Set the feature’s var (chaining-friendly)

val
String


205
206
207
208
# File 'lib/xmpp4r/discovery/iq/discoinfo.rb', line 205

def set_var(val)
  self.var = val
  self
end

#varObject

Get the feature’s var or nil

result
String


189
190
191
# File 'lib/xmpp4r/discovery/iq/discoinfo.rb', line 189

def var
  attributes['var']
end

#var=(val) ⇒ Object

Set the feature’s var

This is a namespace the identity supports.

val
String


198
199
200
# File 'lib/xmpp4r/discovery/iq/discoinfo.rb', line 198

def var=(val)
  attributes['var'] = val
end