Class: Blather::Stanza::Presence::Subscription
- Inherits:
-
Blather::Stanza::Presence
- Object
- Niceogiri::XML::Node
- XMPPNode
- Blather::Stanza
- Blather::Stanza::Presence
- Blather::Stanza::Presence::Subscription
- Includes:
- InstanceMethods
- Defined in:
- lib/blather/stanza/presence/subscription.rb
Overview
# Subscription Stanza
[RFC 3921 Section 8 - Integration of Roster Items and Presence Subscriptions](xmpp.org/rfcs/rfc3921.html#rfc.section.8)
Blather handles subscription request/response through this class. It provides a set of helper methods to quickly transform the stanza into a response.
Defined Under Namespace
Modules: InstanceMethods
Constant Summary
Constants inherited from Blather::Stanza::Presence
Constants inherited from XMPPNode
Instance Attribute Summary
Attributes inherited from Blather::Stanza
Class Method Summary collapse
-
.new(to = nil, type = nil) ⇒ Object
Create a new Subscription stanza.
Methods included from InstanceMethods
#approve!, #cancel!, #refuse!, #request!, #request?, #to=, #unsubscribe!
Methods inherited from Blather::Stanza::Presence
#error?, import, #probe?, #subscribe?, #subscribed?, #type=, #unavailable?, #unsubscribe?, #unsubscribed?
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(to = nil, type = nil) ⇒ Object
Create a new Subscription stanza
21 22 23 24 25 26 |
# File 'lib/blather/stanza/presence/subscription.rb', line 21 def self.new(to = nil, type = nil) node = super() node.to = to node.type = type node end |