class CC::Analyzer::IssueValidations::OtherLocationsFormatValidation
Constants
- CHECKS
Public Class Methods
new(object)
click to toggle source
Calls superclass method
# File lib/cc/analyzer/issue_validations/other_locations_format_validation.rb, line 12 def initialize(object) super @other_location_valid = {} end
Public Instance Methods
message()
click to toggle source
# File lib/cc/analyzer/issue_validations/other_locations_format_validation.rb, line 26 def message "Other locations are not formatted correctly" end
valid?()
click to toggle source
# 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
Private Instance Methods
other_location_valid?(location)
click to toggle source
# File lib/cc/analyzer/issue_validations/other_locations_format_validation.rb, line 32 def other_location_valid?(location) path = location && location["path"] @other_location_valid[path] ||= CHECKS.all? do |klass| klass.new("location" => location).valid? end end