Method: Hanami::Config#inflections

Defined in:
lib/hanami/config.rb

#inflections(&block) ⇒ Dry::Inflector

Configures the app’s custom inflections.

You should call this one time only. Subsequent calls will override previously configured inflections.

Examples:

config.inflections do |inflections|
  inflections.acronym "WNBA"
end

Returns:

  • (Dry::Inflector)

    the configured inflector

See Also:

Since:

  • 2.0.0

[View source]

396
397
398
# File 'lib/hanami/config.rb', line 396

def inflections(&block)
  self.inflector = Dry::Inflector.new(&block)
end