| Class | Inflector::Inflections |
| In: |
lib/core_ex.rb
|
| Parent: | Object |
| camelize_rules | [R] | <<< |
| underscore_rules | [R] | <<< |
# File lib/core_ex.rb, line 164 def camelize(rule, replacement) @camelize_rules.unshift [mk_regexp(rule), replacement] end
>>>
# File lib/core_ex.rb, line 142 def clear ( scope=:all ) case scope when :all # <<< clear_all # >>> else instance_variable_set "@#{scope}", [] end end
<<<
# File lib/core_ex.rb, line 138 def clear_all @plurals, @singulars, @uncountables, @underscore_rules, @camelize_rules = [], [], [], [], [] end
# File lib/core_ex.rb, line 167 def fixed_case ( camel_cased_word, lower_case_and_underscored_word=camel_cased_word.downcase ) camelize(lower_case_and_underscored_word, camel_cased_word) underscore(camel_cased_word, lower_case_and_underscored_word) end
# File lib/core_ex.rb, line 172 def fixed_cases ( *words ) for word in words if word.is_a? Array fixed_case(*word) else fixed_case word end end end