nakajima-elementor 0.0.6 → 0.0.7

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.
Files changed (2) hide show
  1. data/lib/elementor/element_set.rb +11 -7
  2. metadata +1 -1
@@ -11,11 +11,6 @@ module Elementor
11
11
  @node_set = Nokogiri::XML::NodeSet.new(document, array)
12
12
  end
13
13
 
14
- def length
15
- node_set.length
16
- end
17
- alias_method :size, :length
18
-
19
14
  def select(&block)
20
15
  @node_set.select &block
21
16
  end
@@ -24,8 +19,17 @@ module Elementor
24
19
  @node_set = Nokogiri::XML::NodeSet.new(@node_set.document, array)
25
20
  end
26
21
 
27
- def search(selector)
28
- @node_set.search(selector)
22
+ def respond_to?(sym)
23
+ super || @node_set.respond_to?(sym)
24
+ end
25
+
26
+ # Delegates non-ElementSet methods to the NodeSet
27
+ def method_missing(sym, *args, &block)
28
+ if @node_set.respond_to?(sym)
29
+ @node_set.send(sym, *args, &block)
30
+ else
31
+ super
32
+ end
29
33
  end
30
34
  end
31
35
 
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: nakajima-elementor
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.6
4
+ version: 0.0.7
5
5
  platform: ruby
6
6
  authors:
7
7
  - Pat Nakajima