Sha256: 9fe8b8d0c59852120f5cd1ed4e59b48a8005f1a9b450f5fcd61f45685a18e13d
Contents?: true
Size: 405 Bytes
Versions: 1
Compression:
Stored size: 405 Bytes
Contents
# frozen_string_literal: true require "key_vortex/constraint/base" class KeyVortex class Constraint class Maximum < KeyVortex::Constraint::Base attr_reader :value def initialize(value) super() @value = value end def attribute :maximum end def within?(constraint) super && value <= constraint.value end end end end
Version data entries
1 entries across 1 versions & 1 rubygems
Version | Path |
---|---|
key-vortex-0.1.4 | lib/key_vortex/constraint/maximum.rb |