jekyll-autoscout24 0.1.6 → 0.1.7

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: 95bf25062e304d9ed50dd04e8cdfac1ade585143
4
- data.tar.gz: 76302dfbf1749de41572bffda8c8cc5507ae7822
3
+ metadata.gz: 2ee1f51611dd0b475e53dcb08f55408751b47d2a
4
+ data.tar.gz: dd3b2eb09c16afcc76f601f0b3ae2b2dae8d7ba7
5
5
  SHA512:
6
- metadata.gz: fd5c78072b581a26cf35a91b53bdf855f89af942df8dc55c099599ac98f33ab62cd186745706194ae5422679a2e0abb03807614853814437e3d61bd25a73e6e4
7
- data.tar.gz: 63ceba105c3cdf13636f18b67a8aac839293b7a2de711a7e5d83325050bd1e79f7b1859561603ee6727153fab169ff7026a9756de1ee57a21164614d89738767
6
+ metadata.gz: 4467f32fab0cbeef249d3fdca908ac834adc7eb368937440b2a0012e9ec16b570c359d406e7e956784412496af1f76d8905f7d9eadb5e95c98f4beded4db8406
7
+ data.tar.gz: 07645eb734d9431b11f80edd4282d60bb9250593f16893b933367a514259423d76a302f271b4377c2f9f5c007e240521ed0f3b0afb5db5f8fbf0ade4ec733d07
@@ -40,15 +40,36 @@ module Jekyll
40
40
  found = @node.locate(name).first
41
41
  # no match or empty node, therefore nil
42
42
  return nil if found.nil? || found.nodes.empty?
43
- # could be an array
43
+ # special processing for prices collection
44
44
  return Prices.new(found) if name == 'prices'
45
+ # special processing for equipments collection
45
46
  return Equipments.new(found) if name == 'equipments'
47
+ # special processing for images collection
46
48
  return Images.new(found) if name == 'images'
49
+ # special processing for product_bookings collection
50
+ return ProductBookings.new(found) if name == 'product_bookings'
47
51
  # either text or recurse
48
52
  found.text === nil ? Entry.new(found) : found.text
49
53
  end
50
54
  end
51
55
 
56
+ class ProductBookings < Liquid::Drop
57
+ include Enumerable
58
+
59
+ attr_reader :node
60
+
61
+ # ctor
62
+ def initialize(node)
63
+ @node = node
64
+ end
65
+
66
+ def each
67
+ @node.locate("product").each do |n|
68
+ yield Entry.new(n)
69
+ end
70
+ end
71
+ end
72
+
52
73
  class Images < Liquid::Drop
53
74
  include Enumerable
54
75
 
@@ -1,5 +1,5 @@
1
1
  module Jekyll
2
2
  module Autoscout24
3
- VERSION = "0.1.6"
3
+ VERSION = "0.1.7"
4
4
  end
5
5
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: jekyll-autoscout24
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.6
4
+ version: 0.1.7
5
5
  platform: ruby
6
6
  authors:
7
7
  - Enrico Caputo
@@ -9,7 +9,7 @@ authors:
9
9
  autorequire:
10
10
  bindir: exe
11
11
  cert_chain: []
12
- date: 2018-04-26 00:00:00.000000000 Z
12
+ date: 2018-04-27 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: ox