Sha256: e27a297173189133084448363e5ba6957d0f9adb646a68a9a068083d15f16d87

Contents?: true

Size: 352 Bytes

Versions: 1

Compression:

Stored size: 352 Bytes

Contents

# frozen_string_literal: true

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

      def within?(constraint)
        !applies_to?(constraint) || within_applicable?(constraint)
      end

      def to_s
        "#{attribute}: #{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/base.rb