nokolexbor 0.4.2-x64-mingw32 → 0.5.0-x64-mingw32
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/nokolexbor/2.6/nokolexbor.so +0 -0
- data/lib/nokolexbor/2.7/nokolexbor.so +0 -0
- data/lib/nokolexbor/3.0/nokolexbor.so +0 -0
- data/lib/nokolexbor/node.rb +13 -0
- data/lib/nokolexbor/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: a48e74068d7a76f25f8c5cdd2b8f910db875024c4dc823f77e920c0749daf2a6
|
4
|
+
data.tar.gz: 70fb6a0b4bf203d21ede7fbb895deebdfb4dae65bfa4a88a4ab824c84081e7ff
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 94ceebb553857d658ed7f9677ed5140a1c8faa93bb5214c61e68ab6f37bbfd9e2e58ed66b4abda80fff22509b71fff678d6d7b6b0922d1e6aea86df697f71cc1
|
7
|
+
data.tar.gz: 695fef90fb60216d1697ba1b608ebf2bab4b077c6119b1ac1de4884ba5eaacaff69e366cc3a93ab4399db222a661270768258d3aaf46804952f60a2208e4d473
|
Binary file
|
Binary file
|
Binary file
|
data/lib/nokolexbor/node.rb
CHANGED
@@ -51,12 +51,20 @@ module Nokolexbor
|
|
51
51
|
def element?
|
52
52
|
type == ELEMENT_NODE
|
53
53
|
end
|
54
|
+
alias_method :elem?, :element?
|
54
55
|
|
55
56
|
# @return true if this is a {Document}
|
56
57
|
def document?
|
57
58
|
is_a?(Nokolexbor::Document)
|
58
59
|
end
|
59
60
|
|
61
|
+
# Get the path to this node as a CSS expression
|
62
|
+
def css_path
|
63
|
+
path.split(%r{/}).filter_map do |part|
|
64
|
+
part.empty? ? nil : part.gsub(/\[(\d+)\]/, ':nth-of-type(\1)')
|
65
|
+
end.join(" > ")
|
66
|
+
end
|
67
|
+
|
60
68
|
# Get a list of ancestor Node of this Node
|
61
69
|
#
|
62
70
|
# @param [String, nil] selector The selector to match ancestors
|
@@ -285,6 +293,11 @@ module Nokolexbor
|
|
285
293
|
parent_node.add_child(self)
|
286
294
|
end
|
287
295
|
|
296
|
+
# @return true if this Node's attributes include <value>
|
297
|
+
def value?(value)
|
298
|
+
values.include?(value)
|
299
|
+
end
|
300
|
+
|
288
301
|
# Iterate over each attribute name and value pair of this Node.
|
289
302
|
#
|
290
303
|
# @yield [String,String] The name and value of the current attribute.
|
data/lib/nokolexbor/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: nokolexbor
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.
|
4
|
+
version: 0.5.0
|
5
5
|
platform: x64-mingw32
|
6
6
|
authors:
|
7
7
|
- Yicheng Zhou
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2023-
|
11
|
+
date: 2023-05-27 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: rake-compiler
|