Class: Symbol
- Inherits:
-
Object
- Object
- Symbol
- Defined in:
- lib/utils/monkey_patch/symbol.rb
Overview
Monkey patch Symbol class for specific key matching methods
Constant Summary collapse
- SPECIAL_SIGNULAR =
{ abilities: :ability, areas: :location_area, berries: :berry, pokedexes: :pokedex }.freeze
Instance Method Summary collapse
Instance Method Details
#singularize ⇒ Object
10 11 12 |
# File 'lib/utils/monkey_patch/symbol.rb', line 10 def singularize SPECIAL_SIGNULAR[self] || to_s.chop.to_sym end |