Class: CC::Analyzer::IssueValidations::LocationFormatValidation::Validator
- Inherits:
-
Object
- Object
- CC::Analyzer::IssueValidations::LocationFormatValidation::Validator
- Defined in:
- lib/cc/analyzer/issue_validations/location_format_validation.rb
Instance Method Summary collapse
-
#initialize(location) ⇒ Validator
constructor
A new instance of Validator.
- #message ⇒ Object
- #valid? ⇒ Boolean
Constructor Details
#initialize(location) ⇒ Validator
Returns a new instance of Validator.
6 7 8 9 |
# File 'lib/cc/analyzer/issue_validations/location_format_validation.rb', line 6 def initialize(location) @location = location check_validity end |
Instance Method Details
#message ⇒ Object
15 16 17 18 19 |
# File 'lib/cc/analyzer/issue_validations/location_format_validation.rb', line 15 def if error "Location is not formatted correctly: #{error}" end end |
#valid? ⇒ Boolean
11 12 13 |
# File 'lib/cc/analyzer/issue_validations/location_format_validation.rb', line 11 def valid? error.nil? end |