y_fantasy 0.1.4 → 0.1.5
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/CHANGELOG.md +4 -0
- data/Gemfile.lock +1 -1
- data/lib/y_fantasy/resources/pickem_team.rb +2 -2
- data/lib/y_fantasy/version.rb +1 -1
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 147256821fe6b2d55008051ea3624a03aae18c4ca45fdb39716ccc191db0f158
|
4
|
+
data.tar.gz: 89da6343138d22044b18d432c8200da730138b1e1c9dfed3ae0c9118a8a12ab2
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 6d1360154fc4c2afcc49145d67d869d8f7ccb985568041f7aae8b184b955597aa1f758747706ef5a5bfcee7cf0eb708b889b759700dbc3db6aa8716f729e4ddc
|
7
|
+
data.tar.gz: f4b914eb471cff7efd25e9340decab684f0ad95c7c250d12f9110c34966939734159f15634ed4af98c6f689647835f742701605743a06148a51ae362fc55eec5
|
data/CHANGELOG.md
CHANGED
data/Gemfile.lock
CHANGED
@@ -99,7 +99,7 @@ module YFantasy
|
|
99
99
|
# For some reason, Yahoo's API can return more weeks than the group settings allow, and they are always strikes.
|
100
100
|
# @return [Array<WeekPick>] the weekly picks for this team
|
101
101
|
def true_week_picks
|
102
|
-
@true_week_picks = week_picks
|
102
|
+
@true_week_picks = week_picks&.slice(0, group.settings.end_week)
|
103
103
|
end
|
104
104
|
|
105
105
|
# Returns the "true" total strikes, based on the group end week.
|
@@ -108,7 +108,7 @@ module YFantasy
|
|
108
108
|
def true_total_strikes
|
109
109
|
return total_strikes if group.settings.two_pick_start_week != 0
|
110
110
|
|
111
|
-
strikes = true_week_picks.count { |wp| wp
|
111
|
+
strikes = true_week_picks.count { |wp| wp&.picks&.first&.result == "strike" }
|
112
112
|
return group.settings.max_strikes if strikes > group.settings.max_strikes
|
113
113
|
|
114
114
|
strikes
|
data/lib/y_fantasy/version.rb
CHANGED