Class: CC::Analyzer::IssueValidations::OtherLocationsFormatValidation
- Inherits:
-
Validation
- Object
- Validation
- CC::Analyzer::IssueValidations::OtherLocationsFormatValidation
- Defined in:
- lib/cc/analyzer/issue_validations/other_locations_format_validation.rb
Constant Summary collapse
- CHECKS =
[ LocationFormatValidation, PathExistenceValidation, PathPresenceValidation, RelativePathValidation, ].freeze
Instance Method Summary collapse
-
#initialize(object) ⇒ OtherLocationsFormatValidation
constructor
A new instance of OtherLocationsFormatValidation.
- #message ⇒ Object
- #valid? ⇒ Boolean
Constructor Details
#initialize(object) ⇒ OtherLocationsFormatValidation
Returns a new instance of OtherLocationsFormatValidation.
12 13 14 15 |
# File 'lib/cc/analyzer/issue_validations/other_locations_format_validation.rb', line 12 def initialize(object) super @other_location_valid = {} end |
Instance Method Details
#message ⇒ Object
26 27 28 |
# File 'lib/cc/analyzer/issue_validations/other_locations_format_validation.rb', line 26 def "Other locations are not formatted correctly" end |
#valid? ⇒ Boolean
17 18 19 20 21 22 23 24 |
# File 'lib/cc/analyzer/issue_validations/other_locations_format_validation.rb', line 17 def valid? if object["other_locations"] object["other_locations"].is_a?(Array) && object["other_locations"].all?(&method(:other_location_valid?)) else true end end |