Sha256: 40ca6d110e651400b521cfc2319da14a7ab58ef86e384fca1a2a70899364bc72

Contents?: true

Size: 458 Bytes

Versions: 11

Compression:

Stored size: 458 Bytes

Contents

require "zeitwerk"

module Codebuild
  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

11 entries across 11 versions & 1 rubygems

Version Path
codebuild-0.6.7 lib/codebuild/autoloader.rb
codebuild-0.6.6 lib/codebuild/autoloader.rb
codebuild-0.6.5 lib/codebuild/autoloader.rb
codebuild-0.6.4 lib/codebuild/autoloader.rb
codebuild-0.6.3 lib/codebuild/autoloader.rb
codebuild-0.6.2 lib/codebuild/autoloader.rb
codebuild-0.6.1 lib/codebuild/autoloader.rb
codebuild-0.6.0 lib/codebuild/autoloader.rb
codebuild-0.5.0 lib/codebuild/autoloader.rb
codebuild-0.4.0 lib/codebuild/autoloader.rb
codebuild-0.3.0 lib/codebuild/autoloader.rb