Sha256: be5d4b57fe6baea825d2d2b698f105fdba23266ddcbf928c8b50a3a208d311c6

Contents?: true

Size: 329 Bytes

Versions: 6

Compression:

Stored size: 329 Bytes

Contents

# frozen_string_literal: true

class KeyVortex
  class Constraint
    class Base
      def applies_to?(constraint)
        attribute == constraint.attribute
      end

      def within?(constraint)
        constraint.instance_of?(self.class)
      end

      def to_s
        "#{attribute}: #{limit}"
      end
    end
  end
end

Version data entries

6 entries across 6 versions & 1 rubygems

Version Path
key-vortex-0.2.5 lib/key_vortex/constraint/base.rb
key-vortex-0.2.4 lib/key_vortex/constraint/base.rb
key-vortex-0.2.3 lib/key_vortex/constraint/base.rb
key-vortex-0.2.2 lib/key_vortex/constraint/base.rb
key-vortex-0.2.1 lib/key_vortex/constraint/base.rb
key-vortex-0.2.0 lib/key_vortex/constraint/base.rb