Sha256: d58309db3ba6d411a3c8f6ddeedada173374d84260ca8e5f44a3b176ce14046e

Contents?: true

Size: 565 Bytes

Versions: 2

Compression:

Stored size: 565 Bytes

Contents

require "zeitwerk"

module Jets
  module Git
    class Autoloader
      class Inflector < Zeitwerk::Inflector
        def camelize(basename, _abspath)
          map = { version: "VERSION" }
          map[basename.to_sym] || super
        end
      end

      class << self
        def setup
          loader = Zeitwerk::Loader.new
          loader.inflector = Inflector.new
          lib = File.expand_path("../..", __dir__)
          loader.push_dir(lib)
          loader.ignore("#{lib}/jets-git.rb")
          loader.setup
        end
      end
    end
  end
end

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
jets-git-0.2.1 lib/jets/git/autoloader.rb
jets-git-0.2.0 lib/jets/git/autoloader.rb