Class: SportsDataApi::Ncaafb::Player
- Inherits:
-
Object
- Object
- SportsDataApi::Ncaafb::Player
- Defined in:
- lib/sports_data_api/ncaafb/player.rb
Instance Method Summary collapse
-
#initialize(json) ⇒ Player
constructor
A new instance of Player.
Constructor Details
#initialize(json) ⇒ Player
Returns a new instance of Player.
4 5 6 7 8 9 10 |
# File 'lib/sports_data_api/ncaafb/player.rb', line 4 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 |