Module: Cdss::Parsers::BaseParser
- Includes:
- Utils
- Included in:
- AdminCallsParser, ClimateParser, ReadingParser, ReferenceTablesParser, StationParser, StructuresParser, WaterRightsParser, WellParser
- Defined in:
- lib/cdss/parsers/base_parser.rb
Instance Method Summary collapse
Methods included from Utils
#batch_dates, #build_query, #fetch_paginated_data, #format_date, #format_query_param, #parse_timestamp, #safe_float, #safe_integer
Instance Method Details
#parse_collection(response) ⇒ Object
8 9 10 11 12 13 14 15 16 |
# File 'lib/cdss/parsers/base_parser.rb', line 8 def parse_collection(response, &) return [] unless response["ResultList"] if block_given? response["ResultList"].map(&) else response["ResultList"].map { |data| build_resource(data) } end end |