Rename methods with same name

This commit is contained in:
taitus
2019-10-22 10:19:54 +02:00
parent 08957b70c2
commit 432e8233d2

View File

@@ -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