sportradar-api 0.1.14 → 0.1.15
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/Gemfile.lock +1 -1
- data/lib/sportradar/api/soccer/player.rb +9 -5
- data/lib/sportradar/api/version.rb +1 -1
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: b3f212828651413aba085e51763190c25fa8bf75
|
4
|
+
data.tar.gz: 558d13cdefd909ab7d3093e383214a0c3a8f5fed
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 92da2cb90404fc48058844d9f522fb63092d51e5fda36a2d97b289200c2166d661dbe0cb4bf9300802521dc0d948117cbc3a1c29a03ee735481fa21faa07856b
|
7
|
+
data.tar.gz: b993fa6d7fc2059e5618ce38984d7ea61fe274725005c5ffdb1e58ccb63abc877547eabcb6631f6f3b89498409cd2be4e914c68682e0e1ef2c6f60c055094081
|
data/Gemfile.lock
CHANGED
@@ -69,14 +69,18 @@ module Sportradar
|
|
69
69
|
end
|
70
70
|
|
71
71
|
def get_age
|
72
|
-
|
73
|
-
|
74
|
-
|
72
|
+
if birthdate.present?
|
73
|
+
now = Time.now.utc.to_date
|
74
|
+
dob = birthdate.to_date
|
75
|
+
now.year - dob.year - ((now.month > dob.month || (now.month == dob.month && now.day >= dob.day)) ? 0 : 1)
|
76
|
+
end
|
75
77
|
end
|
76
78
|
|
77
79
|
def get_height_ft
|
78
|
-
|
79
|
-
|
80
|
+
if height_in.present?
|
81
|
+
feet, inches = height_in.to_i.divmod(12)
|
82
|
+
"#{feet}' #{inches}\""
|
83
|
+
end
|
80
84
|
end
|
81
85
|
|
82
86
|
private
|