class Dry::Inflector::Inflections

def add_irregular(rule, replacement, target)

Other tags:
    Api: - private

Other tags:
    Since: - 0.1.0

Returns:
  • (undefined) -

Parameters:
  • replacement (String) -- the replacement
  • rule (String) -- the rule
def add_irregular(rule, replacement, target)
  head, *tail = rule.chars.to_a
  rule(/(#{head})#{tail.join}\z/i, "\\1#{replacement[1..]}", target)
end