rom-rb/rom-mongo

View on GitHub
lib/rom/mongo/schema.rb

Summary

Maintainability
A
0 mins
Test Coverage
require 'rom/schema'

module ROM
  module Mongo
    class Schema < ROM::Schema
      # @api public
      def call(relation)
        relation.new(relation.dataset.only(map(&:name)), schema: self)
      end
    end
  end
end