Class: Facebooker::FqlQuery

Inherits:
Parser
  • Object
show all
Defined in:
lib/facebooker/parser.rb

Overview

nodoc

Constant Summary

Constants inherited from Parser

Parser::PARSERS

Class Method Summary collapse

Methods inherited from Parser

anonymous_field_from, array_of, array_of_hashes, array_of_text_values, booleanize, element, hash_by_key_or_value_for, hash_or_value_for, hashinate, hashinate_by_key, parse

Class Method Details

.process(data) ⇒ Object



502
503
504
505
506
# File 'lib/facebooker/parser.rb', line 502

def self.process(data)
  root = element('fql_query_response', data)
  first_child = root.children.reject{|c| c.text? }.first
  first_child.nil? ? [] : [first_child.name, array_of_hashes(root, first_child.name)]
end