travis-ci
998 of 998 new or added lines in 55 files covered. (100.0%)
4674 of 5333 relevant lines covered (87.64%)
639.59 hits per line
|
module Sportradar |
1✔ |
|
module Api |
1✔ |
|
module Basketball |
1✔ |
|
class Record < Data |
1✔ |
|
attr_accessor :id, :team, :wins, :losses, :win_pct, :points_for, :points_against, :point_diff, :games_behind, :streak |
1✔ |
6 |
|
|
|
def initialize(data, type: 'overall', **opts) |
1✔ |
|
@team = opts[:team] |
14,038✔ |
|
@type = type
|
14,038✔ |
10 |
|
|
|
update(data, **opts) |
14,038✔ |
12 |
end
|
|
13 |
|
|
|
def profile |
1✔ |
|
Profile.new(self) |
× |
16 |
end
|
|
17 |
|
|
|
def update(data, **opts) |
1✔ |
|
@wins = data['wins'].to_i |
14,038✔ |
|
@losses = data['losses'].to_i |
14,038✔ |
|
@win_pct = data['win_pct'].to_f |
14,038✔ |
|
@points_for = data['points_for'] |
14,038✔ |
|
@points_against = data['points_against'] |
14,038✔ |
|
@point_diff = data['point_diff'] |
14,038✔ |
|
@games_behind = data['games_behind'] |
14,038✔ |
|
@streak = data['streak'] |
14,038✔ |
27 |
end
|
|
28 |
|
|
29 |
end
|
|
30 |
end
|
|
31 |
end
|
|
32 |
end
|