Class: Fiddler::Parsers::HistoryParser

Inherits:
BaseParser
  • Object
show all
Defined in:
lib/fiddler/parsers/history_parser.rb

Constant Summary

Constants inherited from BaseParser

BaseParser::ERROR_CODES, BaseParser::SUCCESS_CODES

Class Method Summary collapse

Methods inherited from BaseParser

check_response_code, tokenize_response

Class Method Details

.parse_multiple(response) ⇒ Object



10
11
12
13
14
15
16
17
18
19
# File 'lib/fiddler/parsers/history_parser.rb', line 10

def self.parse_multiple(response)
   response = check_response_code(response)
   response = check_for_errors(response)
   token_responses = tokenize_response(response)
   histories = Array.new
   token_responses.each do |token_response|
      histories << history_from_response(token_response)
   end
   histories
end

.parse_single(response) ⇒ Object



4
5
6
7
8
# File 'lib/fiddler/parsers/history_parser.rb', line 4

def self.parse_single(response)
   response = check_response_code(response)
   response = check_for_errors(response)
   history_from_response(response)
end