Class: Symbol

Inherits:
Object
  • Object
show all
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

#singularizeObject



10
11
12
# File 'lib/utils/monkey_patch/symbol.rb', line 10

def singularize
  SPECIAL_SIGNULAR[self] || to_s.chop.to_sym
end