Sha256: 09ae52fed670d1c7436d2d03a48c25bf2af626241f7f9ef01fe6d2482e49dc66

Contents?: true

Size: 522 Bytes

Versions: 9

Compression:

Stored size: 522 Bytes

Contents

require "zeitwerk"

module CliFormat
  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.ignore("#{File.dirname(__dir__)}/cli-format.rb")
        loader.setup
      end
    end
  end
end

Version data entries

9 entries across 9 versions & 1 rubygems

Version Path
cli-format-0.6.1 lib/cli_format/autoloader.rb
cli-format-0.6.0 lib/cli_format/autoloader.rb
cli-format-0.5.0 lib/cli_format/autoloader.rb
cli-format-0.4.0 lib/cli_format/autoloader.rb
cli-format-0.3.0 lib/cli_format/autoloader.rb
cli-format-0.2.2 lib/cli_format/autoloader.rb
cli-format-0.2.1 lib/cli_format/autoloader.rb
cli-format-0.2.0 lib/cli_format/autoloader.rb
cli-format-0.1.0 lib/cli_format/autoloader.rb