Module: FootballApi::Symbolizer::ClassMethods

Defined in:
lib/football_api/mixins/symbolizer.rb

Instance Method Summary collapse

Instance Method Details

#custom_deep_symbolic_hash(hash) ⇒ Object

Custom deep symbolize of an hash So we can override the mess of some footbal-api arrays



12
13
14
15
16
17
18
19
# File 'lib/football_api/mixins/symbolizer.rb', line 12

def custom_deep_symbolic_hash(hash)
  {}.tap do |h|
    Hash(hash).each do |key, value|
      key = symbolyze_key(key)
      h[key] = map_value(key, value)
    end
  end
end