golfscrape 0.0.4 → 0.0.5

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.
@@ -17,9 +17,15 @@ module Golfscrape
17
17
  @third = player.css('td')[4].children.last.content.gsub("\n", "")
18
18
  @fourth = player.css('td')[5].children.last.content.gsub("\n", "")
19
19
  @today = player.css('td')[6].children.last.content.gsub("\n", "")
20
- @thru = player.css('td')[7].children.last.content.gsub("\n", "")
21
- @total = player.css('td')[8].children.last.content.gsub("\n", "")
22
- @strokes = player.css('td')[9].children.last.content.gsub("\n", "")
20
+ @thru = player.css('td')[7].children.last.content.gsub("\n", "") unless player.css('td')[7].attributes["class"].value.match(/total/)
21
+ @total = player.css('td.total').children.last.content.gsub("\n", "")
22
+
23
+ if player.css('td.earnings')
24
+ @strokes = player.css('td')[8].children.last.content.gsub("\n", "")
25
+ else
26
+ @strokes = player.css('td')[9].children.last.content.gsub("\n", "")
27
+ end
28
+
23
29
  rescue
24
30
  end
25
31
 
@@ -1,3 +1,3 @@
1
1
  module Golfscrape
2
- VERSION = "0.0.4"
2
+ VERSION = "0.0.5"
3
3
  end
metadata CHANGED
@@ -1,13 +1,13 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: golfscrape
3
3
  version: !ruby/object:Gem::Version
4
- hash: 23
4
+ hash: 21
5
5
  prerelease:
6
6
  segments:
7
7
  - 0
8
8
  - 0
9
- - 4
10
- version: 0.0.4
9
+ - 5
10
+ version: 0.0.5
11
11
  platform: ruby
12
12
  authors:
13
13
  - Johnny Khai Nguyen
@@ -15,7 +15,7 @@ autorequire:
15
15
  bindir: bin
16
16
  cert_chain: []
17
17
 
18
- date: 2011-07-11 00:00:00 -05:00
18
+ date: 2011-07-17 00:00:00 -05:00
19
19
  default_executable:
20
20
  dependencies:
21
21
  - !ruby/object:Gem::Dependency