Class: Blather::Stanza::Capabilities
- Inherits:
-
DiscoInfo
- Object
- Niceogiri::XML::Node
- XMPPNode
- Blather::Stanza
- Iq
- Iq::Query
- Disco
- DiscoInfo
- Blather::Stanza::Capabilities
- Defined in:
- lib/blather/stanza/disco/capabilities.rb
Overview
# Capabilities Stanza
[XEP-0115 Entity Capabilities](xmpp.org/extensions/xep-0115.html)
XMPP protocol extension for broadcasting and dynamically discovering client, device, or generic entity capabilities.
Constant Summary
Constants inherited from Iq
Constants inherited from XMPPNode
Instance Attribute Summary
Attributes inherited from Blather::Stanza
Class Method Summary collapse
Instance Method Summary collapse
-
#c ⇒ Blather::Stanza::Presence::C
The generated Presence::C node.
-
#features=(features) ⇒ Object
Add an array of features.
-
#identities=(identities) ⇒ Object
Add an array of identities.
-
#node=(node) ⇒ Object
A URI that uniquely identifies a software application, typically a URL at the website of the project or company that produces the software.
-
#ver ⇒ String
A string that is used to verify the identity and supported features of the entity.
Methods inherited from DiscoInfo
Methods inherited from Disco
Methods inherited from Iq::Query
Methods inherited from Iq
#error?, #get?, import, #reply!, #result?, #set?, #type=
Methods inherited from Blather::Stanza
#as_error, #error?, #from, #from=, handler_list, #id, #id=, #initialize, next_id, register, #reply, #reply!, #to, #to=, #type, #type=
Methods inherited from XMPPNode
class_from_registration, #decorate, decorator_modules, import, parse, register, #to_stanza
Constructor Details
This class inherits a constructor from Blather::Stanza
Class Method Details
.new ⇒ Object
11 12 13 |
# File 'lib/blather/stanza/disco/capabilities.rb', line 11 def self.new super :result end |
Instance Method Details
#c ⇒ Blather::Stanza::Presence::C
The generated Presence::C node
48 49 50 |
# File 'lib/blather/stanza/disco/capabilities.rb', line 48 def c Blather::Stanza::Presence::C.new @bare_node, ver end |
#features=(features) ⇒ Object
Add an array of features
40 41 42 43 |
# File 'lib/blather/stanza/disco/capabilities.rb', line 40 def features=(features) super features regenerate_full_node end |
#identities=(identities) ⇒ Object
Add an array of identities
33 34 35 36 |
# File 'lib/blather/stanza/disco/capabilities.rb', line 33 def identities=(identities) super identities regenerate_full_node end |
#node=(node) ⇒ Object
A URI that uniquely identifies a software application, typically a URL at the website of the project or company that produces the software.
26 27 28 29 |
# File 'lib/blather/stanza/disco/capabilities.rb', line 26 def node=(node) @bare_node = node super "#{node}##{ver}" end |
#ver ⇒ String
A string that is used to verify the identity and supported features of the entity.
18 19 20 |
# File 'lib/blather/stanza/disco/capabilities.rb', line 18 def ver generate_ver identities, features end |