mlb_gameday 0.1.8 → 0.1.9

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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 880c328da86352a34dc52a0ebb9b1c1d7ab70009
4
- data.tar.gz: 24f3c8f7f9ba060ad8b70d6abb3f11a6e438f505
3
+ metadata.gz: 659644f1bee589e3bf02073d2d8759404932132d
4
+ data.tar.gz: 18d9c42c2405de51871523f667370b6cb9c0c88a
5
5
  SHA512:
6
- metadata.gz: 78b8112bd767db136c24deaf0d962164e98ecdc81c8cdc169f9de39a26d5411d2bee058931da2be944c728a52f9f801c77c8234a9f997b4a78ca9c8ecf76ccf1
7
- data.tar.gz: cfe68d53e16be35e81e0f807321820c3cffd0f06e8b475287027f08c503e5788d79f7a3baa7579fd4f5c2e376d7b427a8ca6e03ead055d1c92f96ce869486c05
6
+ metadata.gz: cd54b4d1546656b9bc4eb464e92e103e5ad753558447de06c3d221bdceb9364e7454689b1476bc6052a81de537029ebec49a88634b0389e2250338cde1a0e24a
7
+ data.tar.gz: 3a2fc51fbd9564432d5c623a2c38838977c25529adf6d895f245f5efea82690dbff2bbbb81246c0016edf2387e324f5388fe5edbf2527d2abb38e36bdae52ebc
@@ -64,9 +64,15 @@ module MLBGameday
64
64
 
65
65
  # Preview, Pre-Game, In Progress, Final
66
66
  def status
67
- return 'Preview' unless @linescore
68
-
69
- @status ||= @linescore.xpath('//game/@status').text
67
+ @status ||= if @linescore
68
+ @linescore.xpath('//game/@status').text
69
+ else
70
+ {
71
+ 'P' => 'Preview',
72
+ 'I' => 'In Progress',
73
+ 'O' => 'Over'
74
+ }[@gamecenter.xpath('//game/@status').text]
75
+ end
70
76
  end
71
77
 
72
78
  # [3, Top/Middle/Bottom/End]
@@ -1,3 +1,3 @@
1
1
  module MLBGameday
2
- VERSION = '0.1.8'
2
+ VERSION = '0.1.9'
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: mlb_gameday
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.8
4
+ version: 0.1.9
5
5
  platform: ruby
6
6
  authors:
7
7
  - Steven Hoffman