Class: Zeitwerk::GemInflector
- Defined in:
- lib/zeitwerk/gem_inflector.rb
Instance Method Summary collapse
- #camelize(basename, abspath) ⇒ String
-
#initialize(root_file) ⇒ GemInflector
constructor
A new instance of GemInflector.
Constructor Details
#initialize(root_file) ⇒ GemInflector
Returns a new instance of GemInflector.
6 7 8 9 10 |
# File 'lib/zeitwerk/gem_inflector.rb', line 6 def initialize(root_file) namespace = File.basename(root_file, ".rb") lib_dir = File.dirname(root_file) @version_file = File.join(lib_dir, namespace, "version.rb") end |
Instance Method Details
#camelize(basename, abspath) ⇒ String
15 16 17 |
# File 'lib/zeitwerk/gem_inflector.rb', line 15 def camelize(basename, abspath) (basename == "version" && abspath == @version_file) ? "VERSION" : super end |