elementor 0.0.6 → 0.0.7
Sign up to get free protection for your applications and to get access to all the features.
- data/lib/elementor/element_set.rb +11 -7
- 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
|
28
|
-
@node_set.
|
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
|
|