Sha256: 4ef057c51e2a2c3e1b10f4a9022a819433df5540931bfdd788ed119a7721113e

Contents?: true

Size: 486 Bytes

Versions: 1

Compression:

Stored size: 486 Bytes

Contents

# frozen_string_literal: true

module Zeitwerk
  class GemInflector < Inflector
    # @param gem_entry_point [String]
    def initialize(root_file)
      namespace = File.basename(root_file, ".rb")
      @version_file = File.join(namespace, "version.rb")
    end

    # @param basename [String]
    # @param abspath [String]
    # @return [String]
    def camelize(basename, abspath)
      basename == "version" && abspath.end_with?(@version_file) ? "VERSION" : super
    end
  end
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
zeitwerk-1.0.0.alpha lib/zeitwerk/gem_inflector.rb