From c2d154b1ac72a231d221c2e0d30f51433d896e3d Mon Sep 17 00:00:00 2001 From: Bertocq Date: Wed, 20 Sep 2017 16:12:28 +0200 Subject: [PATCH] Comply with Style/PredicateName rule for ? method names --- lib/census_api.rb | 2 +- lib/document_parser.rb | 2 +- lib/local_census.rb | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/lib/census_api.rb b/lib/census_api.rb index 066c0be95..931781c6d 100644 --- a/lib/census_api.rb +++ b/lib/census_api.rb @@ -119,7 +119,7 @@ class CensusApi {get_habita_datos_response: {get_habita_datos_return: {datos_habitante: {}, datos_vivienda: {}}}} end - def is_dni?(document_type) + def dni?(document_type) document_type.to_s == "1" end diff --git a/lib/document_parser.rb b/lib/document_parser.rb index c60b180dc..9e59c6b75 100644 --- a/lib/document_parser.rb +++ b/lib/document_parser.rb @@ -5,7 +5,7 @@ module DocumentParser document_number = document_number.to_s.gsub(/[^0-9A-Za-z]/i, '') variants = [] - if is_dni?(document_type) + if dni?(document_type) document_number, letter = split_letter_from(document_number) number_variants = get_number_variants_with_leading_zeroes_from(document_number) letter_variants = get_letter_variants(number_variants, letter) diff --git a/lib/local_census.rb b/lib/local_census.rb index 6c6e8fe12..1a0428787 100644 --- a/lib/local_census.rb +++ b/lib/local_census.rb @@ -63,7 +63,7 @@ class LocalCensus LocalCensusRecord.find_by(document_type: document_type, document_number: document_number) end - def is_dni?(document_type) + def dni?(document_type) document_type.to_s == "1" end