Module: Hanami::DB

Defined in:
lib/hanami/db.rb,
lib/hanami/db/repo.rb,
lib/hanami/db/struct.rb,
lib/hanami/db/testing.rb,
lib/hanami/db/version.rb,
lib/hanami/db/relation.rb,
lib/hanami/db/gem_inflector.rb

Defined Under Namespace

Modules: Testing Classes: GemInflector, Relation, Repo, Struct

Constant Summary collapse

VERSION =
"2.2.0"

Class Method Summary collapse

Class Method Details

.loaderObject

This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.

Since:

  • 2.2.0



13
14
15
16
17
18
19
20
21
22
23
24
25
# File 'lib/hanami/db.rb', line 13

def self.loader
  @loader ||= Zeitwerk::Loader.new.tap do |loader|
    root = File.expand_path("..", __dir__)

    loader.inflector = GemInflector.new("#{root}/hanami/db.rb")
    loader.tag = "hanami-db"
    loader.push_dir root
    loader.ignore(
      "#{root}/hanami-db.rb",
      "#{root}/hanami/db/gem_inflector.rb"
    )
  end
end