class ActiveSupport::Inflector::Inflections::Uncountables
Experimental RBS support (using type sampling data from the type_fusion
project).
# sig/active_support/inflector/inflections.rbs class ActiveSupport::Inflector::Inflections::Uncountables < ActiveSupport::Inflector::Inflections::Array def uncountable?: (String str) -> false end
def <<(*word)
def <<(*word) add(word) end
def add(words)
def add(words) words = words.flatten.map(&:downcase) concat(words) @regex_array += words.map { |word| to_regex(word) } self end
def delete(entry)
def delete(entry) super entry @regex_array.delete(to_regex(entry)) end
def initialize
def initialize @regex_array = [] super end
def to_regex(string)
def to_regex(string) /\b#{::Regexp.escape(string)}\Z/i end
def uncountable?(str)
Experimental RBS support (using type sampling data from the type_fusion
project).
def uncountable?: (String str) -> false
This signature was generated using 62 samples from 1 application.
def uncountable?(str) @regex_array.any? { |regex| regex.match? str } end