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

Version Path
sports_data_api-0.2.4 lib/sports_data_api/nfl/player.rb
sports_data_api-0.2.3 lib/sports_data_api/nfl/player.rb
sports_data_api-0.2.2 lib/sports_data_api/nfl/player.rb
sports_data_api-0.2.1 lib/sports_data_api/nfl/player.rb
sports_data_api-0.2.0 lib/sports_data_api/nfl/player.rb