Class: Sportradar::Api::Rank
- Inherits:
-
Object
- Object
- Sportradar::Api::Rank
- Defined in:
- lib/sportradar/api/poll.rb
Instance Method Summary collapse
-
#initialize(data) ⇒ Rank
constructor
A new instance of Rank.
Constructor Details
#initialize(data) ⇒ Rank
Returns a new instance of Rank.
4 5 6 7 8 9 10 11 12 13 14 15 16 17 |
# File 'lib/sportradar/api/poll.rb', line 4 def initialize(data) @id = data['id'] @name = data['name'] @market = data['market'] @rank = data['rank'] @wins = data['wins'] @losses = data['losses'] @prev_rank = data['prev_rank'] @points = data['points'] || data['votes'] @fp_votes = data['fp_votes'].to_i if data['rpi'] @rpi = data end end |