Sha256: fe46ae6b862afed2a3ed9a7c4fdbf31ebe19a7342aac7076e80408e30ce072f9

Contents?: true

Size: 718 Bytes

Versions: 13

Compression:

Stored size: 718 Bytes

Contents

module Blather
class Stanza
class PubSubOwner

  class Delete < PubSubOwner
    
    register :pubsub_delete, :delete, self.registered_ns

    def self.new(type = :set, host = nil, node = nil)
      new_node = super(type, host)
      new_node.node = node
      new_node
    end

    def node
      delete_node[:node]
    end

    def node=(node)
      delete_node[:node] = node
    end

    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
  end #Retract

end #PubSub
end #Stanza
end #Blather

Version data entries

13 entries across 13 versions & 2 rubygems

Version Path
sprsquish-blather-0.4.0 lib/blather/stanza/pubsub_owner/delete.rb
sprsquish-blather-0.4.1 lib/blather/stanza/pubsub_owner/delete.rb
sprsquish-blather-0.4.2 lib/blather/stanza/pubsub_owner/delete.rb
sprsquish-blather-0.4.3 lib/blather/stanza/pubsub_owner/delete.rb
sprsquish-blather-0.4.4 lib/blather/stanza/pubsub_owner/delete.rb
blather-0.4.7 lib/blather/stanza/pubsub_owner/delete.rb
blather-0.4.6 lib/blather/stanza/pubsub_owner/delete.rb
blather-0.4.5 lib/blather/stanza/pubsub_owner/delete.rb
blather-0.4.4 lib/blather/stanza/pubsub_owner/delete.rb
blather-0.4.3 lib/blather/stanza/pubsub_owner/delete.rb
blather-0.4.1 lib/blather/stanza/pubsub_owner/delete.rb
blather-0.4.2 lib/blather/stanza/pubsub_owner/delete.rb
blather-0.4.0 lib/blather/stanza/pubsub_owner/delete.rb