Sha256: 5154ce349ff3637178fdd99683203c06f50ed1d0a7e7755e7e46232039386893

Contents?: true

Size: 453 Bytes

Versions: 28

Compression:

Stored size: 453 Bytes

Contents

require "zeitwerk"

module Cody
  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.setup
      end
    end
  end
end

Version data entries

28 entries across 28 versions & 1 rubygems

Version Path
cody-1.1.0 lib/cody/autoloader.rb
cody-1.0.6 lib/cody/autoloader.rb
cody-1.0.5 lib/cody/autoloader.rb
cody-1.0.4 lib/cody/autoloader.rb
cody-1.0.3 lib/cody/autoloader.rb
cody-1.0.2 lib/cody/autoloader.rb
cody-1.0.1 lib/cody/autoloader.rb
cody-1.0.0 lib/cody/autoloader.rb
cody-0.9.8 lib/cody/autoloader.rb
cody-0.9.7 lib/cody/autoloader.rb
cody-0.9.6 lib/cody/autoloader.rb
cody-0.9.5 lib/cody/autoloader.rb
cody-0.9.4 lib/cody/autoloader.rb
cody-0.9.3 lib/cody/autoloader.rb
cody-0.9.2 lib/cody/autoloader.rb
cody-0.9.1 lib/cody/autoloader.rb
cody-0.9.0 lib/cody/autoloader.rb
cody-0.8.6 lib/cody/autoloader.rb
cody-0.8.5 lib/cody/autoloader.rb
cody-0.8.4 lib/cody/autoloader.rb