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.2.17 lib/templates/plugin/ci/lib/%gem_name%/autoloader.rb.tt
terraspace-2.2.16 lib/templates/plugin/ci/lib/%gem_name%/autoloader.rb.tt
terraspace-2.2.15 lib/templates/plugin/ci/lib/%gem_name%/autoloader.rb.tt
terraspace-2.2.14 lib/templates/plugin/ci/lib/%gem_name%/autoloader.rb.tt
terraspace-2.2.13 lib/templates/plugin/ci/lib/%gem_name%/autoloader.rb.tt
terraspace-2.2.12 lib/templates/plugin/ci/lib/%gem_name%/autoloader.rb.tt
terraspace-2.2.11 lib/templates/plugin/ci/lib/%gem_name%/autoloader.rb.tt
terraspace-2.2.10 lib/templates/plugin/ci/lib/%gem_name%/autoloader.rb.tt
terraspace-2.2.9 lib/templates/plugin/ci/lib/%gem_name%/autoloader.rb.tt
terraspace-2.2.8 lib/templates/plugin/ci/lib/%gem_name%/autoloader.rb.tt
terraspace-2.2.7 lib/templates/plugin/ci/lib/%gem_name%/autoloader.rb.tt
terraspace-2.2.6 lib/templates/plugin/ci/lib/%gem_name%/autoloader.rb.tt
terraspace-2.2.5 lib/templates/plugin/ci/lib/%gem_name%/autoloader.rb.tt
terraspace-2.2.4 lib/templates/plugin/ci/lib/%gem_name%/autoloader.rb.tt
terraspace-2.2.3 lib/templates/plugin/ci/lib/%gem_name%/autoloader.rb.tt
terraspace-2.2.2 lib/templates/plugin/ci/lib/%gem_name%/autoloader.rb.tt
terraspace-2.2.1 lib/templates/plugin/ci/lib/%gem_name%/autoloader.rb.tt
terraspace-2.2.0 lib/templates/plugin/ci/lib/%gem_name%/autoloader.rb.tt
terraspace-2.1.7 lib/templates/plugin/ci/lib/%gem_name%/autoloader.rb.tt
terraspace-2.1.6 lib/templates/plugin/ci/lib/%gem_name%/autoloader.rb.tt