class Realm::ROM::Plugin

Public Class Methods

setup(config, container) click to toggle source
# File lib/realm/rom/plugin.rb, line 6
def self.setup(config, container)
  return unless config.persistence_gateway[:type] == :rom

  gateway = Gateway.new(config.persistence_gateway)
  container.register('persistence.gateway', gateway)
  container.register(:rom, gateway) # for backward compatibility as we access it a lot in tests
end