Class: Facebooker::BatchRun
Overview
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
.current_batch ⇒ Object
396
397
398
|
# File 'lib/facebooker/parser.rb', line 396
def current_batch
Thread.current[:facebooker_current_batch]
end
|
.current_batch=(current_batch) ⇒ Object
393
394
395
|
# File 'lib/facebooker/parser.rb', line 393
def current_batch=(current_batch)
Thread.current[:facebooker_current_batch]=current_batch
end
|
.process(data) ⇒ Object
400
401
402
403
404
405
406
407
408
409
410
411
|
# File 'lib/facebooker/parser.rb', line 400
def self.process(data)
array_of_text_values(element('batch_run_response',data),"batch_run_response_elt").each_with_index do |response,i|
batch_request=current_batch[i]
body=Struct.new(:body).new
body.body=response
begin
batch_request.result=Parser.parse(batch_request.method,body)
rescue Exception=>ex
batch_request.exception_raised=ex
end
end
end
|