Class: Facebooker::EventMembersGet
- Defined in:
- lib/facebooker/parser.rb
Overview
:nodoc:
Constant Summary
Constants inherited from Parser
Class Method Summary collapse
Methods inherited from Parser
anonymous_field_from, array_of, array_of_hashes, array_of_text_values, element, hash_or_value_for, hashinate, parse
Class Method Details
.process(data) ⇒ Object
372 373 374 375 376 377 378 379 380 381 |
# File 'lib/facebooker/parser.rb', line 372 def self.process(data) root = element('events_getMembers_response', data) result = ['attending', 'declined', 'unsure', 'not_replied'].map do |rsvp_status| array_of(root, rsvp_status) {|element| element}.map do |element| array_of_text_values(element, 'uid').map do |uid| {:rsvp_status => rsvp_status}.merge(:uid => uid) end end end.flatten end |