Module: Karafka::Helpers::Inflector
- Defined in:
- lib/karafka/helpers/inflector.rb
Overview
Inflector provides inflection for the whole Karafka framework with additional inflection caching (due to the fact, that Dry::Inflector is slow)
Class Method Summary collapse
-
.map(string) ⇒ String
Inflected string.
Class Method Details
.map(string) ⇒ String
Returns inflected string.
20 21 22 |
# File 'lib/karafka/helpers/inflector.rb', line 20 def map(string) @map[string] ||= ENGINE.underscore(string).tr('/', '_') end |