Module: Hanami::Reloader

Defined in:
lib/hanami/reloader.rb,
lib/hanami/reloader/version.rb,
lib/hanami/reloader/commands.rb

Overview

Hanami reloader

Defined Under Namespace

Modules: Commands

Constant Summary collapse

VERSION =

Since:

  • 0.1.0

"2.2.0"

Class Method Summary collapse

Class Method Details

.gem_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.0.0



11
12
13
14
15
16
17
18
19
20
21
22
# File 'lib/hanami/reloader.rb', line 11

def self.gem_loader
  @gem_loader ||= Zeitwerk::Loader.new.tap do |loader|
    root = File.expand_path("..", __dir__)
    loader.tag = "hanami-reloader"
    loader.inflector = Zeitwerk::GemInflector.new("#{root}/hanami-reloader.rb")
    loader.push_dir(root)
    loader.ignore(
      "#{root}/hanami-reloader.rb",
      "#{root}/hanami/controller/version.rb"
    )
  end
end