Sha256: 8f7a03aba26e65cb05cff65b72ee8203cc01b99776cd2c776d792a96f328eef9

Contents?: true

Size: 520 Bytes

Versions: 5

Compression:

Stored size: 520 Bytes

Contents

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

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

      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

5 entries across 5 versions & 1 rubygems

Version Path
rom-rails-2.3.1 spec/dummy/lib/rom/test_adapter.rb
rom-rails-2.3.0 spec/dummy/lib/rom/test_adapter.rb
rom-rails-2.2.0 spec/dummy/lib/rom/test_adapter.rb
rom-rails-2.0.0 spec/dummy/lib/rom/test_adapter.rb
rom-rails-1.2.0 spec/dummy/lib/rom/test_adapter.rb