diff --git a/lib/remote_census_api.rb b/lib/remote_census_api.rb index 56c4cd73b..e579b3e42 100644 --- a/lib/remote_census_api.rb +++ b/lib/remote_census_api.rb @@ -16,7 +16,7 @@ class RemoteCensusApi end def extract_value(path_value) - path = parse_path(path_value) + path = parse_response_path(path_value) return nil unless path.present? @body.dig(*path) end @@ -63,7 +63,7 @@ class RemoteCensusApi "#{extract_value(path_value_name)} #{extract_value(path_value_surname)}" end - def parse_path(path_value) + def parse_response_path(path_value) path_value.split(".").map { |section| section.to_sym } if path_value.present? end end @@ -99,11 +99,11 @@ class RemoteCensusApi end def fill_in(structure, path_value, value) - path = parse_path(path_value) + path = parse_request_path(path_value) update_value(structure, path, value) if path.present? end - def parse_path(path_value) + def parse_request_path(path_value) path_value.split(".") if path_value.present? end