Sha256: 089e49a7964c15df6dba128cefe6d53728ae38ea298916fbe2c24ff4b2104799

Contents?: true

Size: 1.2 KB

Versions: 1

Compression:

Stored size: 1.2 KB

Contents

# =XMPP4R - XMPP Library for Ruby
# License:: Ruby's license (see the LICENSE file) or GNU GPL, at your option.
# Website::http://xmpp4r.github.io

require 'xmpp4r/iq'

module Jabber
  module PubSub
    ##
    # Unsubscribe
    class Unsubscribe < XMPPElement
      name_xmlns 'unsubscribe'
      def initialize(myjid=nil,mynode=nil,mysubid=nil)
        super()
        jid = myjid
        node =  mynode
        subid = mysubid
      end

      ##
      # shows the jid
      # return:: [String]
      def jid
        (a = attribute('jid')).nil? ? a : JID.new(a.value)
      end

      ##
      # sets the jid
      # =:: [Jabber::JID] or [String]
      def jid=(myjid)
        add_attribute('jid', myjid ? myjid.to_s : nil)
      end

      ##
      # shows the node
      # return:: [String]
      def node
        attributes['node']
      end

      ##
      # sets the node
      # =:: [String]
      def node=(mynode)
        attributes['node'] = mynode
      end

      ##
      # shows the subid
      # return:: [String]
      def subid
        attributes['subid']
      end

      ##
      # sets the subid
      # =:: [String]
      def subid=(mysubid)
        attributes['subid'] = mysubid
      end
    end
  end
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
xmpp4r-0.5.6 lib/xmpp4r/pubsub/children/unsubscribe.rb