Class: EasyUpnp::DefaultEventParser
- Inherits:
-
Object
- Object
- EasyUpnp::DefaultEventParser
- Defined in:
- lib/easy_upnp/events/event_parsers.rb
Instance Method Summary collapse
Instance Method Details
#parse(event_xml) ⇒ Object
5 6 7 8 9 10 11 12 |
# File 'lib/easy_upnp/events/event_parsers.rb', line 5 def parse(event_xml) x = Nokogiri::XML(event_xml) prop_changes = x.xpath('//e:propertyset/e:property/*', e: 'urn:schemas-upnp-org:event-1-0').map do |n| [n.name.to_sym, n.text] end Hash[prop_changes] end |