Sha256: 4f5cbb14f3ae59475067cf2a3465bc5fc805c48026e6974f8a659debad01d7bb

Contents?: true

Size: 457 Bytes

Versions: 7

Compression:

Stored size: 457 Bytes

Contents

require "zeitwerk"

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

7 entries across 7 versions & 1 rubygems

Version Path
codepipeline-0.3.4 lib/codepipe/autoloader.rb
codepipeline-0.3.3 lib/codepipe/autoloader.rb
codepipeline-0.3.2 lib/codepipe/autoloader.rb
codepipeline-0.3.1 lib/codepipe/autoloader.rb
codepipeline-0.3.0 lib/codepipe/autoloader.rb
codepipeline-0.2.1 lib/codepipe/autoloader.rb
codepipeline-0.2.0 lib/codepipe/autoloader.rb