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-0.8.3 lib/cody/autoloader.rb
cody-0.8.2 lib/cody/autoloader.rb
cody-0.8.1 lib/cody/autoloader.rb
cody-0.8.0 lib/cody/autoloader.rb
cody-0.7.3 lib/cody/autoloader.rb
cody-0.7.2 lib/cody/autoloader.rb
cody-0.7.1 lib/cody/autoloader.rb
cody-0.7.0 lib/cody/autoloader.rb