letsshop_mapper 1.1.1 → 1.1.2
Sign up to get free protection for your applications and to get access to all the features.
@@ -13,9 +13,11 @@ module LetsShopMapper
|
|
13
13
|
attr_reader :thumb
|
14
14
|
attr_reader :supplier
|
15
15
|
attr_reader :facets
|
16
|
+
attr_reader :delivery_times
|
17
|
+
attr_reader :product_condition
|
16
18
|
|
17
19
|
def initialize(entry = nil)
|
18
|
-
@id, @link, @title, @description, @price, @thumb, @supplier = nil
|
20
|
+
@id, @link, @title, @description, @price, @thumb, @supplier, @delivery_times, @product_condition = nil
|
19
21
|
@facets = []
|
20
22
|
parse(entry) if entry
|
21
23
|
end
|
@@ -30,6 +32,8 @@ module LetsShopMapper
|
|
30
32
|
@currency = entry.at('letsshop/price')['currency']
|
31
33
|
@discount = entry.at('letsshop/price')['discount']
|
32
34
|
@older_price = entry.at('letsshop/price')['older']
|
35
|
+
@delivery_times = entry.at('letsshop/delivery_times').text
|
36
|
+
@product_condition = entry.at('letsshop/product_condition').text
|
33
37
|
|
34
38
|
entry.children.search('Query').each do |f|
|
35
39
|
@facets << Base::Facet::new(f)
|
@@ -53,6 +57,8 @@ module LetsShopMapper
|
|
53
57
|
s += "Link: #{@link}\n"
|
54
58
|
s += "Title: #{@title}\n"
|
55
59
|
s += "Description: #{@description}\n"
|
60
|
+
s += "Delivery times: #{@delivery_times}\n"
|
61
|
+
s += "Product condition: #{@product_condition}\n"
|
56
62
|
s += "Thumbnail: #{@thumb}\n"
|
57
63
|
s += "Price: #{@price} #{@currency}\n"
|
58
64
|
s += "Discount: #{@older_price} (#{@discount})\n"
|
metadata
CHANGED
@@ -1,13 +1,13 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: letsshop_mapper
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
hash:
|
4
|
+
hash: 23
|
5
5
|
prerelease: false
|
6
6
|
segments:
|
7
7
|
- 1
|
8
8
|
- 1
|
9
|
-
-
|
10
|
-
version: 1.1.
|
9
|
+
- 2
|
10
|
+
version: 1.1.2
|
11
11
|
platform: ruby
|
12
12
|
authors:
|
13
13
|
- happun
|
@@ -15,7 +15,7 @@ autorequire:
|
|
15
15
|
bindir: bin
|
16
16
|
cert_chain: []
|
17
17
|
|
18
|
-
date:
|
18
|
+
date: 2011-02-10 00:00:00 +01:00
|
19
19
|
default_executable:
|
20
20
|
dependencies: []
|
21
21
|
|