Sha256: a5e8407e23280d92c0002a47bf424e104e6cea0479a0a31f3a4b9b995ff2cb6f

Contents?: true

Size: 492 Bytes

Versions: 6

Compression:

Stored size: 492 Bytes

Contents

module ROM
  module TestAdapter
    class Relation < ROM::Relation
      adapter :test_adapter
    end

    class Gateway < ROM::Gateway
      include Dry::Equalizer(:args)

      attr_reader :args, :datasets

      def initialize(args)
        @args = args
        @datasets = {}
      end

      def dataset(name)
        @datasets[name] = []
      end

      def dataset?(name)
        datasets.key?(name)
      end
    end
  end
end

ROM.register_adapter(:test_adapter, ROM::TestAdapter)

Version data entries

6 entries across 6 versions & 1 rubygems

Version Path
rom-rails-1.1.1 spec/dummy/lib/rom/test_adapter.rb
rom-rails-1.1.0 spec/dummy/lib/rom/test_adapter.rb
rom-rails-1.0.1 spec/dummy/lib/rom/test_adapter.rb
rom-rails-1.0.0 spec/dummy/lib/rom/test_adapter.rb
rom-rails-1.0.0.rc1 spec/dummy/lib/rom/test_adapter.rb
rom-rails-1.0.0.beta1 spec/dummy/lib/rom/test_adapter.rb