mlb_gameday 0.0.1 → 0.0.2

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: 44c62e0ba49a76a04d966d57d162ef34c05defa8
4
- data.tar.gz: 6cd8d0677d05264ecb4758af5729d352f5444859
3
+ metadata.gz: 1302a0dfbd293aa2eb93dff27788c20e54be5941
4
+ data.tar.gz: db38d4f94573a9a7c2d15bfe61690108fd5768cb
5
5
  SHA512:
6
- metadata.gz: 872e48a16c5bfbc8ab5d5633c549e4e14d7f808cefa43806c6e3c97947779bfc934fcf5ea49ebf009b29c7bcef3d8c6b7acec3f33006bf1ad91a561c0929fccc
7
- data.tar.gz: 2d34ee614888daac58ca4d6bb1155f1456316fabcae184b537e67a468e34e61ad774e0ae56ce3dd3a48861b1b38d29f09241332cc73cdab3f90ae4e978ce71ce
6
+ metadata.gz: 8c3a6b10ddb05a6a9aee7fed5464dac444ce8f5c57308afb322f54fbc324ebda53ebed4717ac774159d9828fbc4989be7853a3ccba7092b4a30de04d7b3601e6
7
+ data.tar.gz: 31e57bfcdacb60a371af13c3bdae16826d3a497ea7da29728a34e588f6f0321efe5fb092b2c54af906580400ebf499ba05c9887ffff5615828e5afd1b191c8c9
@@ -25,12 +25,14 @@ module MLBGameday
25
25
  @linescore.xpath("//game/@venue").first.value
26
26
  end
27
27
 
28
- def start_time(team = nil)
29
- return "#{ @linescore.xpath("//game/@away_time").first.value } #{ @linescore.xpath("//game/@away_time_zone").first.value }" if team == @away
30
-
28
+ def home_start_time
31
29
  "#{ @linescore.xpath("//game/@home_time").first.value } #{ @linescore.xpath("//game/@home_time_zone").first.value }"
32
30
  end
33
31
 
32
+ def away_start_time
33
+ "#{ @linescore.xpath("//game/@away_time").first.value } #{ @linescore.xpath("//game/@away_time_zone").first.value }"
34
+ end
35
+
34
36
  # Preview, Pre-Game, In Progress, Final
35
37
  def status
36
38
  @status ||= @linescore.xpath("//game/@status").first.value
@@ -1,3 +1,3 @@
1
1
  module MLBGameday
2
- VERSION = "0.0.1"
2
+ VERSION = "0.0.2"
3
3
  end
data/spec/game_spec.rb CHANGED
@@ -27,14 +27,14 @@ describe "An MLB Gameday Game object" do
27
27
  it "should start at the correct time for the home team" do
28
28
  game = @games[0]
29
29
 
30
- expect(game.start_time).to eq("1:10 PT")
30
+ expect(game.home_start_time).to eq("1:10 PT")
31
31
  end
32
32
 
33
33
  # TODO: Pick another game, LA and SF are both Pacific
34
34
  it "should start at the correct time for the away team" do
35
35
  game = @games[0]
36
36
 
37
- expect(game.start_time(@giants)).to eq("1:10 PT")
37
+ expect(game.away_start_time).to eq("1:10 PT")
38
38
  end
39
39
 
40
40
  it "should have Clayton Kershaw starting" do
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.0.1
4
+ version: 0.0.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Steven Hoffman