ROM::Repository.setup

Parsed documentation:
View on GitHub
Setup a repository

@overload setup(type, *args)
  Sets up a single-repository given a repository type.
  For custom repositories, create an instance and pass it directly.

  @param [Symbol] type
  @param [Array] *args

@overload setup(repository)
  @param [Repository] repository

@return [Repository] a specific repository subclass

@example
  module SuperDB
    class Repository < ROM::Repository
      def initialize(options)
      end
    end
  end

  ROM.register_adapter(:super_db, SuperDB)

  Repository.setup(:super_db, some: 'options')
  # SuperDB::Repository.new(some: 'options') is called

  # or alternatively
  super_db = Repository.setup(SuperDB::Repository.new(some: 'options'))
  Repository.setup(super_db)

@api public
Suggestions:
Please help! Open an issue on GitHub if this assessment is incorrect.