Class: Zeitwerk::GemInflector
- Defined in:
- lib/zeitwerk/gem_inflector.rb
Instance Method Summary collapse
- #camelize(basename, abspath) ⇒ Object
-
#initialize(root_file) ⇒ GemInflector
constructor
A new instance of GemInflector.
Methods inherited from Inflector
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") root_dir = File.dirname(root_file) @version_file = File.join(root_dir, namespace, "version.rb") end |
Instance Method Details
#camelize(basename, abspath) ⇒ Object
13 14 15 |
# File 'lib/zeitwerk/gem_inflector.rb', line 13 def camelize(basename, abspath) abspath == @version_file ? "VERSION" : super end |