Sha256: d32e46cfc2a664a8579c027f05141d59fca6fb073217c9fdc56ec822a7c7851d
Contents?: true
Size: 342 Bytes
Versions: 5
Compression:
Stored size: 342 Bytes
Contents
module SportsDataApi module Nfl class Player def initialize(json) player_ivar = self.instance_variable_set("@player", {}) self.class.class_eval { attr_reader :"player" } json.each_pair do | attr_name, attr_value| player_ivar[attr_name.to_sym] = attr_value end end end end end
Version data entries
5 entries across 5 versions & 1 rubygems