module Dinja

Simple dependency injection

Constants

VERSION

Attributes

loader[R]

Code loader instance

Public Class Methods

root() click to toggle source
# File lib/dinja.rb, line 11
def root
  @root ||= Pathname.new(File.expand_path(File.join("..", ".."), __FILE__))
end
setup() click to toggle source
# File lib/dinja.rb, line 15
def setup
  @loader = Zeitwerk::Loader.for_gem

  # Register inflections
  require root.join("config/inflections.rb")

  # Do not eager load integrations
  loader.do_not_eager_load(root.join("lib/dinja/railtie.rb"))
  loader.do_not_eager_load(root.join("lib/dinja/rspec.rb"))

  loader.setup
  loader.eager_load
end