Sha256: 1da267de735336c7b17a8d809be9edae5eccc520842f3f2fb878218cd36d47e5
Contents?: true
Size: 328 Bytes
Versions: 2
Compression:
Stored size: 328 Bytes
Contents
module Compel module Validation class In < Condition def validate_value unless valid? "must be within #{option_value}" end end private def valid? option_value.include?(value) end end class Within < In; end class Range < In; end end end
Version data entries
2 entries across 2 versions & 1 rubygems
Version | Path |
---|---|
compel-0.3.6 | lib/compel/validation/conditions/in.rb |
compel-0.3.4 | lib/compel/validation/conditions/in.rb |