Sha256: 364a9cac97e77cc45010fd599da2cc9b62a2e19dddaeb12a004998403241f87d

Contents?: true

Size: 509 Bytes

Versions: 1

Compression:

Stored size: 509 Bytes

Contents

# frozen_string_literal: true

module Pragma
  module Contract
    module ModelFinder
      class Base
        include Adaptor

        class << self
          def supports?(_klass)
            fail NotImplementedError
          end
        end

        attr_reader :klass, :options

        def initialize(klass, options)
          @klass = klass
          @options = { by: :id }.merge(options)
        end

        def find(_value)
          fail NotImplementedError
        end
      end
    end
  end
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
pragma-contract-2.1.1 lib/pragma/contract/model_finder/base.rb