Module: Dinja
- Defined in:
- lib/dinja.rb,
lib/dinja/rspec.rb,
lib/dinja/railtie.rb,
lib/dinja/version.rb,
lib/dinja/container.rb
Overview
Simple dependency injection
Defined Under Namespace
Modules: RSpec, Version Classes: Container, Railtie
Constant Summary collapse
Class Attribute Summary collapse
-
.loader ⇒ Object
readonly
Code loader instance.
Class Method Summary collapse
Class Attribute Details
.loader ⇒ Object (readonly)
Code loader instance
9 10 11 |
# File 'lib/dinja.rb', line 9 def loader @loader end |
Class Method Details
.root ⇒ Object
11 12 13 |
# File 'lib/dinja.rb', line 11 def root @root ||= Pathname.new(File.(File.join("..", ".."), __FILE__)) end |
.setup ⇒ Object
15 16 17 18 19 20 21 22 23 24 25 26 27 |
# 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 |