instance method
clear
Ruby on Rails 6.1.7.10
Since v2.2.3Signature
clear(scope = :all)
Clears the loaded inflections within a given scope (default is :all). Give the scope as a symbol of the inflection type, the options are: :plurals, :singulars, :uncountables, :humans.
clear :all clear :plurals
Parameters
-
scopeopt = :all
Source
# File activesupport/lib/active_support/inflector/inflections.rb, line 222
def clear(scope = :all)
case scope
when :all
@plurals, @singulars, @uncountables, @humans = [], [], Uncountables.new, []
else
instance_variable_set "@#{scope}", []
end
end
Defined in activesupport/lib/active_support/inflector/inflections.rb line 222
· View on GitHub
· Improve this page
· Find usages on GitHub
Defined in ActiveSupport::Inflector::Inflections