Class: Drymm::Inflector Private

Inherits:
Dry::Inflector
  • Object
show all
Defined in:
lib/drymm/inflector.rb

This class is part of a private API. You should avoid using this class if possible, as it may be removed or be changed in the future.

Instance Method Summary collapse

Constructor Details

#initialize(root_file) ⇒ Inflector

This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.

Returns a new instance of Inflector.



8
9
10
11
12
13
14
15
16
# File 'lib/drymm/inflector.rb', line 8

def initialize(root_file)
  super() do |inflections|
    inflections.acronym "AST"
    yield(inflections) if block_given?
  end
  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) ⇒ Object

This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.



18
19
20
# File 'lib/drymm/inflector.rb', line 18

def camelize(basename, abspath)
  abspath == @version_file ? "VERSION" : super(basename)
end