class Blather::Stanza::PubSubOwner::Delete
[XEP-0060 Section 8.4 Delete
a Node](xmpp.org/extensions/xep-0060.html#owner-delete)
@handler :pubsub_delete
Public Class Methods
new(type = :set, host = nil, node = nil)
click to toggle source
Create a new delete stanza
@param [Blather::Stanza::Iq::VALID_TYPES] type the IQ stanza type @param [String] host the host to send the request to @param [String] node the name of the node to delete
Calls superclass method
Blather::Stanza::PubSubOwner::new
# File lib/blather/stanza/pubsub_owner/delete.rb, line 18 def self.new(type = :set, host = nil, node = nil) new_node = super(type, host) new_node.node = node new_node end
Public Instance Methods
delete_node()
click to toggle source
Get or create the actual delete node on the stanza
@return [Blather::XMPPNode]
# File lib/blather/stanza/pubsub_owner/delete.rb, line 41 def delete_node unless delete_node = pubsub.find_first('ns:delete', :ns => self.class.registered_ns) self.pubsub << (delete_node = XMPPNode.new('delete', self.document)) delete_node.namespace = self.pubsub.namespace end delete_node end
node()
click to toggle source
Get the name of the node to delete
@return [String]
# File lib/blather/stanza/pubsub_owner/delete.rb, line 27 def node delete_node[:node] end
node=(node)
click to toggle source
Set the name of the node to delete
@param [String] node
# File lib/blather/stanza/pubsub_owner/delete.rb, line 34 def node=(node) delete_node[:node] = node end