Module: Cdss::Parsers::WaterRightsParser
- Extended by:
- BaseParser
- Defined in:
- lib/cdss/parsers/water_rights_parser.rb
Class Method Summary collapse
Methods included from BaseParser
Methods included from Utils
#batch_dates, #build_query, #fetch_paginated_data, #format_date, #format_query_param, #parse_timestamp, #safe_float, #safe_integer
Class Method Details
.parse_water_rights(response, type:) ⇒ Object
9 10 11 12 13 14 15 16 17 18 19 20 |
# File 'lib/cdss/parsers/water_rights_parser.rb', line 9 def parse_water_rights(response, type:) parse_collection(response) do |data| case type when :net_amount build_net_amount(data) when :transaction build_transaction(data) else raise ArgumentError, "Invalid water rights type: #{type}" end end end |