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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 99b6e3654a7095a42a10299359cbeb9e7a3a3ad9
4
- data.tar.gz: dd7dad056a0560698f6c231e5692b014fa4a73ce
3
+ metadata.gz: d1f8db79bd324ff953fe103358d51f322695439d
4
+ data.tar.gz: 8401ec98ace95b24fdc0b1f1635c9883d3ca3e45
5
5
  SHA512:
6
- metadata.gz: 673935fc1552015380521533451aa66853618e12079db5b335e2dfc31b67c78c64db81a9b61913d7a5b185c9c01b61b3b8427a8dcc0517d096a3ff478bea3b28
7
- data.tar.gz: 14801a53c66c4034da3ebeb65e5612f384125e5c4979bb150b43f9e99f19ca0350baea576dfbc85dc50d6203cb7bc3f35a93d01b3aee45bfe828d5cac60aef0b
6
+ metadata.gz: 35bbbc6f394ad8589e1b1445f20df8b8b7b29f3143ed26c831a3cc1136e5b60b04cbc9305a6d1696fb389a60e683dfaeae820ba73e3c69b1fa8795d473550443
7
+ data.tar.gz: cf1f2a54db25041b0b2610124af69fdd8bac920dcb59d5036de8aa60a13a178c60f418ee30a92267750feee5a710e723c6d8d724ce2300e1d210be95b3d52e27
@@ -33,11 +33,19 @@ module MLBGameday
33
33
  end
34
34
 
35
35
  def home_start_time(ampm: true)
36
- "#{ @linescore.xpath("//game/@home_time").first.value } #{ @linescore.xpath("//game/@home_time_zone").first.value }"
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
- "#{ @linescore.xpath("//game/@away_time").first.value } #{ @linescore.xpath("//game/@away_time_zone").first.value }"
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
- [@linescore.xpath("//game/@inning").first.value, @linescore.xpath("//game/@inning_state").first.value]
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
@@ -1,3 +1,3 @@
1
1
  module MLBGameday
2
- VERSION = "0.0.9"
2
+ VERSION = "0.0.10"
3
3
  end
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.9
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-04-12 00:00:00.000000000 Z
11
+ date: 2013-07-19 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler