Class: Jabber::PubSub::Unsubscribe

Inherits:
XMPPElement show all
Defined in:
lib/xmpp4r/pubsub/children/unsubscribe.rb

Overview

Unsubscribe

Instance Method Summary collapse

Methods inherited from XMPPElement

class_for_name_xmlns, #clone, force_xmlns, force_xmlns?, import, name_xmlns, name_xmlns_for_class, #parent=, #set_xml_lang, #typed_add, #xml_lang, #xml_lang=

Methods inherited from REXML::Element

#==, #delete_elements, #each_elements, #first_element, #first_element_content, #first_element_text, #import, import, #replace_element_content, #replace_element_text, #typed_add

Constructor Details

#initialize(myjid = nil, mynode = nil, mysubid = nil) ⇒ Unsubscribe

Returns a new instance of Unsubscribe


13
14
15
16
17
18
# File 'lib/xmpp4r/pubsub/children/unsubscribe.rb', line 13

def initialize(myjid=nil,mynode=nil,mysubid=nil)
  super()
  jid = myjid
  node =  mynode
  subid = mysubid
end

Instance Method Details

#jidObject

shows the jid

return
String

23
24
25
# File 'lib/xmpp4r/pubsub/children/unsubscribe.rb', line 23

def jid
  (a = attribute('jid')).nil? ? a : JID.new(a.value)
end

#jid=(myjid) ⇒ Object

sets the jid

:: [Jabber::JID] or [String]


30
31
32
# File 'lib/xmpp4r/pubsub/children/unsubscribe.rb', line 30

def jid=(myjid)
  add_attribute('jid', myjid ? myjid.to_s : nil)
end

#nodeObject

shows the node

return
String

37
38
39
# File 'lib/xmpp4r/pubsub/children/unsubscribe.rb', line 37

def node
  attributes['node']
end

#node=(mynode) ⇒ Object

sets the node

:: [String]


44
45
46
# File 'lib/xmpp4r/pubsub/children/unsubscribe.rb', line 44

def node=(mynode)
  attributes['node'] = mynode
end

#subidObject

shows the subid

return
String

51
52
53
# File 'lib/xmpp4r/pubsub/children/unsubscribe.rb', line 51

def subid
  attributes['subid']
end

#subid=(mysubid) ⇒ Object

sets the subid

:: [String]


58
59
60
# File 'lib/xmpp4r/pubsub/children/unsubscribe.rb', line 58

def subid=(mysubid)
  attributes['subid'] = mysubid
end