Class: KinopoiskDevApi::Inflector

Inherits:
Zeitwerk::GemInflector
  • Object
show all
Defined in:
lib/kinopoisk_dev_api/inflector.rb

Instance Method Summary collapse

Instance Method Details

#camelize(basename, abspath) ⇒ Object



5
6
7
8
9
10
11
12
13
14
# File 'lib/kinopoisk_dev_api/inflector.rb', line 5

def camelize(basename, abspath)
  case basename
  when "endpoints"
    "ENDPOINTS"
  when /(.*)_(v\d+(?:_\d+)*)/
    super(::Regexp.last_match(1), abspath) + ::Regexp.last_match(2).upcase
  else
    super
  end
end