From 432e8233d29c61e90a8afdd1410d956eb18408fc Mon Sep 17 00:00:00 2001 From: taitus Date: Tue, 22 Oct 2019 10:19:54 +0200 Subject: [PATCH] Rename methods with same name --- lib/remote_census_api.rb | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) 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