Sha256: 198f410773df59555b4aa24f1ca3a0960797da761dc8f88e1938f1762010cd76
Contents?: true
Size: 545 Bytes
Versions: 69
Compression:
Stored size: 545 Bytes
Contents
module CC module Analyzer module IssueValidations class RemediationPointsValidation < Validation def valid? remediation_points.nil? || positive_integer?(remediation_points) end def message "Remediation points must be a non-negative integer" end private def remediation_points @remediation_points ||= object["remediation_points"] end def positive_integer?(x) x.is_a?(Integer) && x >= 0 end end end end end
Version data entries
69 entries across 69 versions & 2 rubygems