Class: Jabber::PubSub::Unsubscribe
- Inherits:
-
XMPPElement
- Object
- REXML::Element
- XMPPElement
- Jabber::PubSub::Unsubscribe
- Defined in:
- lib/vendor/xmpp4r/lib/xmpp4r/pubsub/children/unsubscribe.rb
Overview
Unsubscribe
Instance Method Summary collapse
-
#initialize(myjid = nil, mynode = nil) ⇒ Unsubscribe
constructor
A new instance of Unsubscribe.
-
#jid ⇒ Object
- shows the jid return
-
[String].
-
#jid=(myjid) ⇒ Object
- sets the jid =
- Jabber::JID
-
or [String].
-
#node ⇒ Object
- shows the node return
-
[String].
-
#node=(mynode) ⇒ Object
- sets the node =
-
[String].
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, #first_element, #first_element_text, #import, import, #replace_element_text, #typed_add
Constructor Details
#initialize(myjid = nil, mynode = nil) ⇒ Unsubscribe
Returns a new instance of Unsubscribe.
13 14 15 16 17 |
# File 'lib/vendor/xmpp4r/lib/xmpp4r/pubsub/children/unsubscribe.rb', line 13 def initialize(myjid=nil,mynode=nil) super() jid = myjid node = mynode end |
Instance Method Details
#jid ⇒ Object
shows the jid
- return
- String
22 23 24 |
# File 'lib/vendor/xmpp4r/lib/xmpp4r/pubsub/children/unsubscribe.rb', line 22 def jid (a = attribute('jid')).nil? ? a : JID.new(a.value) end |
#jid=(myjid) ⇒ Object
sets the jid
:: [Jabber::JID] or [String]
29 30 31 |
# File 'lib/vendor/xmpp4r/lib/xmpp4r/pubsub/children/unsubscribe.rb', line 29 def jid=(myjid) add_attribute('jid', myjid ? myjid.to_s : nil) end |
#node ⇒ Object
shows the node
- return
- String
36 37 38 |
# File 'lib/vendor/xmpp4r/lib/xmpp4r/pubsub/children/unsubscribe.rb', line 36 def node attributes['node'] end |
#node=(mynode) ⇒ Object
sets the node
:: [String]
43 44 45 |
# File 'lib/vendor/xmpp4r/lib/xmpp4r/pubsub/children/unsubscribe.rb', line 43 def node=(mynode) attributes['node'] = mynode end |