Sha256: 0c61fb8b5a8be189114c613ae2549e66f20eb8f935b622b734519e1f67415969

Contents?: true

Size: 496 Bytes

Versions: 31

Compression:

Stored size: 496 Bytes

Contents

require "zeitwerk"

module Lono
  class Autoloader
    class Inflector < Zeitwerk::Inflector
      def camelize(basename, _abspath)
        map = { cli: "CLI", 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! # uncomment to debug
        loader.setup
      end
    end
  end
end

Version data entries

31 entries across 31 versions & 1 rubygems

Version Path
lono-6.1.11 lib/lono/autoloader.rb
lono-6.1.10 lib/lono/autoloader.rb
lono-6.1.9 lib/lono/autoloader.rb
lono-6.1.8 lib/lono/autoloader.rb
lono-6.1.7 lib/lono/autoloader.rb
lono-6.1.6 lib/lono/autoloader.rb
lono-6.1.5 lib/lono/autoloader.rb
lono-6.1.4 lib/lono/autoloader.rb
lono-6.1.3 lib/lono/autoloader.rb
lono-6.1.2 lib/lono/autoloader.rb
lono-6.1.1 lib/lono/autoloader.rb
lono-6.1.0 lib/lono/autoloader.rb
lono-6.0.1 lib/lono/autoloader.rb
lono-6.0.0 lib/lono/autoloader.rb
lono-5.3.4 lib/lono/autoloader.rb
lono-5.3.3 lib/lono/autoloader.rb
lono-5.3.2 lib/lono/autoloader.rb
lono-5.3.1 lib/lono/autoloader.rb
lono-5.3.0 lib/lono/autoloader.rb
lono-5.2.8 lib/lono/autoloader.rb