Sha256: fb49eebd6e16941e17567e407e6c7935dbd4be39ce57866c548401d40b253c1f

Contents?: true

Size: 407 Bytes

Versions: 1

Compression:

Stored size: 407 Bytes

Contents

# frozen_string_literal: true

require "key_vortex/constraint/base"

class KeyVortex
  class Constraint
    class Minimum < KeyVortex::Constraint::Base
      attr_reader :value

      def initialize(value)
        super()
        @value = value
      end

      def attribute
        :maximum
      end

      def within_applicable?(constraint)
        value >= constraint.value
      end
    end
  end
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
key-vortex-0.1.3 lib/key_vortex/constraint/minimum.rb