Sha256: b601f33ae98594127dbcc0267e5c4108eba7926a9eb4e222493c02c2b94c928e
Contents?: true
Size: 513 Bytes
Versions: 20
Compression:
Stored size: 513 Bytes
Contents
module Shogun module Verifier class Range def initialize(name:, data:, range:) @data = data @name = name @range = range end def valid? if @data.is_a?(String) @range.cover?(@data.size) else @range.cover?(@data) end end def id "#{@name}_was_out_of_range" end def context { "maximum" => @range.max, "minimum" => @range.min } end end end end
Version data entries
20 entries across 20 versions & 1 rubygems