class Jabber::PubSub::Event

Event a publishing event

Public Instance Methods

event_type?() click to toggle source

return the payload type

# File 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() click to toggle source

return payload

# File lib/xmpp4r/pubsub/children/event.rb, line 19
def payload
  elements
end
payload=(pl) click to toggle source

add payload

payload
REXML::Element
# File lib/xmpp4r/pubsub/children/event.rb, line 26
def payload=(pl)
  add_element = pl
end