Sha256: 274723bc53ebaa65a8d443fbc0c9ce598c5e7d2d0de7fbd234a6d943bc5d0b85

Contents?: true

Size: 706 Bytes

Versions: 13

Compression:

Stored size: 706 Bytes

Contents

module Blather
class Stanza
class PubSubOwner

  class Purge < PubSubOwner
    
    register :pubsub_purge, :purge, 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
      purge_node[:node]
    end

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

    def purge_node
      unless purge_node = pubsub.find_first('ns:purge', :ns => self.class.registered_ns)
        self.pubsub << (purge_node = XMPPNode.new('purge', self.document))
        purge_node.namespace = self.pubsub.namespace
      end
      purge_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/purge.rb
sprsquish-blather-0.4.1 lib/blather/stanza/pubsub_owner/purge.rb
sprsquish-blather-0.4.2 lib/blather/stanza/pubsub_owner/purge.rb
sprsquish-blather-0.4.3 lib/blather/stanza/pubsub_owner/purge.rb
sprsquish-blather-0.4.4 lib/blather/stanza/pubsub_owner/purge.rb
blather-0.4.7 lib/blather/stanza/pubsub_owner/purge.rb
blather-0.4.6 lib/blather/stanza/pubsub_owner/purge.rb
blather-0.4.5 lib/blather/stanza/pubsub_owner/purge.rb
blather-0.4.4 lib/blather/stanza/pubsub_owner/purge.rb
blather-0.4.3 lib/blather/stanza/pubsub_owner/purge.rb
blather-0.4.2 lib/blather/stanza/pubsub_owner/purge.rb
blather-0.4.1 lib/blather/stanza/pubsub_owner/purge.rb
blather-0.4.0 lib/blather/stanza/pubsub_owner/purge.rb