Methods
Class Public methods
new()
Source:
# File activesupport/lib/active_support/inflector/inflections.rb, line 35
def initialize
@regex_array = []
super
end
Instance Public methods
<<(*word)
Source:
# File activesupport/lib/active_support/inflector/inflections.rb, line 45
def <<(*word)
add(word)
end
add(words)
Source:
# File activesupport/lib/active_support/inflector/inflections.rb, line 49
def add(words)
words = words.flatten.map(&:downcase)
concat(words)
@regex_array += words.map { |word| to_regex(word) }
self
end
delete(entry)
Source:
# File activesupport/lib/active_support/inflector/inflections.rb, line 40
def delete(entry)
super entry
@regex_array.delete(to_regex(entry))
end
uncountable?(str)
Source:
# File activesupport/lib/active_support/inflector/inflections.rb, line 56
def uncountable?(str)
@regex_array.any? { |regex| regex.match? str }
end