mlb_gameday 0.0.9 → 0.0.10
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/mlb_gameday/game.rb +13 -3
- data/lib/mlb_gameday/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: d1f8db79bd324ff953fe103358d51f322695439d
|
4
|
+
data.tar.gz: 8401ec98ace95b24fdc0b1f1635c9883d3ca3e45
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 35bbbc6f394ad8589e1b1445f20df8b8b7b29f3143ed26c831a3cc1136e5b60b04cbc9305a6d1696fb389a60e683dfaeae820ba73e3c69b1fa8795d473550443
|
7
|
+
data.tar.gz: cf1f2a54db25041b0b2610124af69fdd8bac920dcb59d5036de8aa60a13a178c60f418ee30a92267750feee5a710e723c6d8d724ce2300e1d210be95b3d52e27
|
data/lib/mlb_gameday/game.rb
CHANGED
@@ -33,11 +33,19 @@ module MLBGameday
|
|
33
33
|
end
|
34
34
|
|
35
35
|
def home_start_time(ampm: true)
|
36
|
-
|
36
|
+
if ampm
|
37
|
+
"#{ @linescore.xpath("//game/@home_time").first.value } #{ @linescore.xpath("//game/@home_ampm").first.value } #{ @linescore.xpath("//game/@home_time_zone").first.value }"
|
38
|
+
else
|
39
|
+
"#{ @linescore.xpath("//game/@home_time").first.value } #{ @linescore.xpath("//game/@home_time_zone").first.value }"
|
40
|
+
end
|
37
41
|
end
|
38
42
|
|
39
43
|
def away_start_time(ampm: true)
|
40
|
-
|
44
|
+
if ampm
|
45
|
+
"#{ @linescore.xpath("//game/@away_time").first.value } #{ @linescore.xpath("//game/@away_ampm").first.value } #{ @linescore.xpath("//game/@away_time_zone").first.value }"
|
46
|
+
else
|
47
|
+
"#{ @linescore.xpath("//game/@away_time").first.value } #{ @linescore.xpath("//game/@away_time_zone").first.value }"
|
48
|
+
end
|
41
49
|
end
|
42
50
|
|
43
51
|
# Preview, Pre-Game, In Progress, Final
|
@@ -47,7 +55,9 @@ module MLBGameday
|
|
47
55
|
|
48
56
|
# [3, Top/Middle/Bottom/End]
|
49
57
|
def inning
|
50
|
-
[
|
58
|
+
return [0, '?'] if @linescore.xpath("//game/@inning").nil?
|
59
|
+
|
60
|
+
[@linescore.xpath("//game/@inning").first.value.to_i, @linescore.xpath("//game/@inning_state").first.value]
|
51
61
|
end
|
52
62
|
|
53
63
|
def runners
|
data/lib/mlb_gameday/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: mlb_gameday
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0.
|
4
|
+
version: 0.0.10
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Steven Hoffman
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2013-
|
11
|
+
date: 2013-07-19 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bundler
|