edgar 0.0.2 → 0.0.3

Sign up to get free protection for your applications and to get access to all the features.
Files changed (2) hide show
  1. data/lib/edgar.rb +3 -1
  2. metadata +3 -3
data/lib/edgar.rb CHANGED
@@ -33,7 +33,9 @@ class Edgar
33
33
  no_results = doc.css('#ifrm2 font.normalbold')[0]
34
34
  return [] if no_results and no_results.content == 'No Results were Found.'
35
35
  # fetch number of results so we slice properly
36
- num_returned = doc.css('#header td:first font.normalbold')[0].content.match(/- (\d+)/)[1].to_i
36
+ num_returned = doc.css('#header td:first > font.normalbold')[0]
37
+ return [] if num_returned == nil
38
+ num_returned = num_returned.content.match(/- (\d+)/)[1].to_i
37
39
  css_types = {
38
40
  :date => 0,
39
41
  :title_url => 1,
metadata CHANGED
@@ -1,13 +1,13 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: edgar
3
3
  version: !ruby/object:Gem::Version
4
- hash: 27
4
+ hash: 25
5
5
  prerelease:
6
6
  segments:
7
7
  - 0
8
8
  - 0
9
- - 2
10
- version: 0.0.2
9
+ - 3
10
+ version: 0.0.3
11
11
  platform: ruby
12
12
  authors:
13
13
  - Peter Lubell-Doughtie