pricegrabber 0.1.1 → 0.1.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: 0f968667d22269c277dc219379f78725447ec948
4
- data.tar.gz: 968e5e69eb37ac74c57bd5228350b13beab7e7b6
3
+ metadata.gz: f53fca46a42c99de022063c3ba54558c4a21f9f5
4
+ data.tar.gz: 6244e388d6c4315281d4d596009902fe093ab264
5
5
  SHA512:
6
- metadata.gz: a08abcac34f81624bd7cda1ea88a3065c74fbd5ad91e8d92b833d2b5d70b0c501e7ba5776d4b1f87428e763c7377325369d30748c86fe3273dc6467ab72c2dce
7
- data.tar.gz: 5dbbc5a7b27a2690339aa90b08c167f8be37ed3373804eebac5edafc59568cc1edc643e00058601e06b5cbc3fc748794a187d2967c2c647555e687222317c41f
6
+ metadata.gz: bb07549f47614d769b4483a6fe09037cde8a052e4d6c1bdf9fed0f227eaf2f238f4b5d723fedfbff1eec4c46ffe446422d43152a7b2238c86978a9097094d77b
7
+ data.tar.gz: d6fd3d00454409c4e4d4d17ac0ba21f21d9d59158a6b185bf22a1fc83898bc06357922ce485cda4a64e6cb17006b8621424bfdef839b3cf34aa23c9f52421af1
@@ -25,7 +25,7 @@ module PriceGrabber
25
25
 
26
26
  curr_result.public_send(:"#{want.tr(".", "_")}=", curr_value)
27
27
  end
28
- @results << curr_result
28
+ @results << curr_result unless curr_result.empty?
29
29
  end
30
30
  end
31
31
 
@@ -19,5 +19,11 @@ module PriceGrabber
19
19
  end
20
20
  ins
21
21
  end
22
+
23
+ def empty?
24
+ instance_variables.inject(true) do |is_empty, ivar_name|
25
+ is_empty && !instance_variable_get(ivar_name)
26
+ end
27
+ end
22
28
  end
23
29
  end
@@ -1,3 +1,3 @@
1
1
  module Pricegrabber
2
- VERSION = "0.1.1"
2
+ VERSION = "0.1.2"
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: pricegrabber
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.1
4
+ version: 0.1.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Timothy Raymond