Class: CC::Analyzer::IssueValidations::LocationFormatValidation::Validator

Inherits:
Object
  • Object
show all
Defined in:
lib/cc/analyzer/issue_validations/location_format_validation.rb

Instance Method Summary collapse

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

#messageObject



15
16
17
18
19
# File 'lib/cc/analyzer/issue_validations/location_format_validation.rb', line 15

def message
  if error
    "Location is not formatted correctly: #{error}"
  end
end

#valid?Boolean

Returns:

  • (Boolean)


11
12
13
# File 'lib/cc/analyzer/issue_validations/location_format_validation.rb', line 11

def valid?
  error.nil?
end