Sha256: 0cb2f189c72062f7c8a70ea2736d85b44d2f434616d4b85c8de2c98fa1eba4f5
Contents?: true
Size: 427 Bytes
Versions: 4
Compression:
Stored size: 427 Bytes
Contents
module SportsDataApi class MergedStats < JsonData def initialize(json, override_var_name = nil) super(json, override_var_name) ivar = instance_variable_get("@#{instance_var_name}") json.each do |key, val| next unless val.is_a? Hash json[key].each do |sub_key, data| ivar["#{key}_#{sub_key}".to_sym] = data end ivar.delete key.to_sym end end end end
Version data entries
4 entries across 4 versions & 1 rubygems