Class: NumberPlateValidator::CountryValidatorBase
- Inherits:
-
Object
- Object
- NumberPlateValidator::CountryValidatorBase
- Defined in:
- lib/number_plate_validator/country_validator_base.rb
Direct Known Subclasses
Instance Attribute Summary collapse
-
#country ⇒ Object
readonly
Returns the value of attribute country.
Instance Method Summary collapse
Instance Attribute Details
#country ⇒ Object (readonly)
Returns the value of attribute country.
4 5 6 |
# File 'lib/number_plate_validator/country_validator_base.rb', line 4 def country @country end |
Instance Method Details
#is_valid?(registration_number) ⇒ Boolean
6 7 8 9 |
# File 'lib/number_plate_validator/country_validator_base.rb', line 6 def is_valid?(registration_number) @license = registration_number.gsub(/\s/, "").upcase if registration_number.present? @license.present? end |