Sha256: 86583b6813285f29599d7d2bb7e0c3280d25028c596f6882f9113ebb6ac0cafb

Contents?: true

Size: 536 Bytes

Versions: 30

Compression:

Stored size: 536 Bytes

Contents

require "zeitwerk"

module <%= gem_class_name %>
  class Autoloader
    class Inflector < Zeitwerk::Inflector
      def camelize(basename, _abspath)
        map = { version: "VERSION" }
        map[basename.to_sym] || super
      end
    end

    class << self
      def setup
        loader = Zeitwerk::Loader.new
        loader.inflector = Inflector.new
        loader.push_dir(File.dirname(__dir__)) # lib
        loader.log! if ENV["<%= gem_name.underscore.upcase %>_AUTOLOAD_LOG"]
        loader.setup
      end
    end
  end
end

Version data entries

30 entries across 30 versions & 1 rubygems

Version Path
terraspace-2.1.5 lib/templates/plugin/ci/lib/%gem_name%/autoloader.rb.tt
terraspace-2.1.4 lib/templates/plugin/ci/lib/%gem_name%/autoloader.rb.tt
terraspace-2.1.3 lib/templates/plugin/ci/lib/%gem_name%/autoloader.rb.tt
terraspace-2.1.2 lib/templates/plugin/ci/lib/%gem_name%/autoloader.rb.tt
terraspace-2.1.1 lib/templates/plugin/ci/lib/%gem_name%/autoloader.rb.tt
terraspace-2.1.0 lib/templates/plugin/ci/lib/%gem_name%/autoloader.rb.tt
terraspace-2.0.3 lib/templates/plugin/ci/lib/%gem_name%/autoloader.rb.tt
terraspace-2.0.2 lib/templates/plugin/ci/lib/%gem_name%/autoloader.rb.tt
terraspace-2.0.1 lib/templates/plugin/ci/lib/%gem_name%/autoloader.rb.tt
terraspace-2.0.0 lib/templates/plugin/ci/lib/%gem_name%/autoloader.rb.tt