Class: Jabber::PubSub::Event
- Inherits:
-
XMPPElement
- Object
- REXML::Element
- XMPPElement
- Jabber::PubSub::Event
- Defined in:
- lib/gems/xmpp4r-0.4/lib/xmpp4r/pubsub/children/event.rb
Overview
Event a publishing event
Instance Method Summary collapse
-
#event_type? ⇒ Boolean
return the payload type.
-
#payload ⇒ Object
return payload.
-
#payload=(pl) ⇒ Object
- add payload payload
-
[REXML::Element].
Methods inherited from XMPPElement
class_for_name_xmlns, #clone, force_xmlns, force_xmlns?, import, #initialize, 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
This class inherits a constructor from Jabber::XMPPElement
Instance Method Details
#event_type? ⇒ Boolean
return the payload type
32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 |
# File 'lib/gems/xmpp4r-0.4/lib/xmpp4r/pubsub/children/event.rb', line 32 def event_type? # each child of event # this should iterate only one time each_element('./event/*') { |plelement| case plelement.name when 'collection' then return :collection when 'configuration' then return :configuration when 'delete' then return :delete when 'items' then return :items when 'purge' then return :purge when 'subscription' then return :subscription else return nil end } end |
#payload ⇒ Object
return payload
19 20 21 |
# File 'lib/gems/xmpp4r-0.4/lib/xmpp4r/pubsub/children/event.rb', line 19 def payload elements end |
#payload=(pl) ⇒ Object
add payload
- payload
- REXML::Element
26 27 28 |
# File 'lib/gems/xmpp4r-0.4/lib/xmpp4r/pubsub/children/event.rb', line 26 def payload=(pl) add_element = pl end |