jini 0.0.3 → 0.0.4
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.
- checksums.yaml +4 -4
- data/.yardoc/checksums +1 -1
- data/.yardoc/objects/root.dat +0 -0
- data/doc/Jini/InvalidPath.html +4 -4
- data/doc/Jini.html +20 -29
- data/doc/_index.html +5 -5
- data/doc/file.README.html +4 -4
- data/doc/frames.html +1 -1
- data/doc/index.html +4 -4
- data/doc/top-level-namespace.html +4 -4
- data/jini.gemspec +1 -1
- data/lib/jini.rb +10 -11
- metadata +1 -1
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 846a3a2642216363a51a97176a2bd5a66ce8d8ab2f95fec119b8fa18cbdbc3fa
|
|
4
|
+
data.tar.gz: 18e99fe2ed6124aefb16eae5d9ef965066f0def272ba0696c0a885761ab0902c
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 3a5b2ffecd5bceb1f604fec039c491ea2fef6178166e98856b1ac1e80748265c80ec9d3fee74cc0aed1fcf9182062c1e280042bc6c00ba0ff6d5ebfd0c5690ba
|
|
7
|
+
data.tar.gz: 1cc0a3cb04cf1c0d3d7008f0bd4c3bbde753ae3b0a1ae940bc53645fb1606058068080efa583e29e0fbdec1eff238d19bb49c582b3d4f8a34466058ca21b41ca
|
data/.yardoc/checksums
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
lib/jini.rb
|
|
1
|
+
lib/jini.rb c940835283ea1ff11567787b6e278213a1735924
|
data/.yardoc/objects/root.dat
CHANGED
|
Binary file
|
data/doc/Jini/InvalidPath.html
CHANGED
|
@@ -6,7 +6,7 @@
|
|
|
6
6
|
<title>
|
|
7
7
|
Exception: Jini::InvalidPath
|
|
8
8
|
|
|
9
|
-
— Documentation by YARD 0.9.
|
|
9
|
+
— Documentation by YARD 0.9.28
|
|
10
10
|
|
|
11
11
|
</title>
|
|
12
12
|
|
|
@@ -125,9 +125,9 @@
|
|
|
125
125
|
</div>
|
|
126
126
|
|
|
127
127
|
<div id="footer">
|
|
128
|
-
Generated on Thu Sep 15
|
|
129
|
-
<a href="
|
|
130
|
-
0.9.
|
|
128
|
+
Generated on Thu Sep 15 19:58:11 2022 by
|
|
129
|
+
<a href="https://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
|
|
130
|
+
0.9.28 (ruby-3.0.0).
|
|
131
131
|
</div>
|
|
132
132
|
|
|
133
133
|
</div>
|
data/doc/Jini.html
CHANGED
|
@@ -6,7 +6,7 @@
|
|
|
6
6
|
<title>
|
|
7
7
|
Class: Jini
|
|
8
8
|
|
|
9
|
-
— Documentation by YARD 0.9.
|
|
9
|
+
— Documentation by YARD 0.9.28
|
|
10
10
|
|
|
11
11
|
</title>
|
|
12
12
|
|
|
@@ -328,7 +328,7 @@
|
|
|
328
328
|
|
|
329
329
|
|
|
330
330
|
<span class="summary_desc"><div class='inline'>
|
|
331
|
-
<p>Removes attr by name before: ‘/<a href="@k="v"">parent/child</a
|
|
331
|
+
<p>Removes attr by name before: ‘/<a href="@k="v"">parent/child</a>’ after: ‘/parent/child’.</p>
|
|
332
332
|
</div></span>
|
|
333
333
|
|
|
334
334
|
</li>
|
|
@@ -376,7 +376,7 @@
|
|
|
376
376
|
|
|
377
377
|
|
|
378
378
|
<span class="summary_desc"><div class='inline'>
|
|
379
|
-
<p>Replace all
|
|
379
|
+
<p>Replace all ‘/’ to ‘::’ symbols if path doesn’t contain invalid symbols for selection.</p>
|
|
380
380
|
</div></span>
|
|
381
381
|
|
|
382
382
|
</li>
|
|
@@ -444,11 +444,6 @@
|
|
|
444
444
|
<em class="default">(defaults to: <tt>''</tt>)</em>
|
|
445
445
|
|
|
446
446
|
|
|
447
|
-
—
|
|
448
|
-
<div class='inline'>
|
|
449
|
-
<p>with head of your xpath</p>
|
|
450
|
-
</div>
|
|
451
|
-
|
|
452
447
|
</li>
|
|
453
448
|
|
|
454
449
|
</ul>
|
|
@@ -494,7 +489,7 @@
|
|
|
494
489
|
</h3><div class="docstring">
|
|
495
490
|
<div class="discussion">
|
|
496
491
|
|
|
497
|
-
<p>Xpath with all named elements. Addition
|
|
492
|
+
<p>Xpath with all named elements. Addition ‘//node’ to xpath</p>
|
|
498
493
|
|
|
499
494
|
|
|
500
495
|
</div>
|
|
@@ -573,9 +568,7 @@
|
|
|
573
568
|
</h3><div class="docstring">
|
|
574
569
|
<div class="discussion">
|
|
575
570
|
|
|
576
|
-
<p>Additional attribute for xpath
|
|
577
|
-
<dl class="rdoc-list label-list"><dt>@key=“value”
|
|
578
|
-
<dd></dd></dl>
|
|
571
|
+
<p>Additional attribute for xpath. ‘[@key=“value”]’</p>
|
|
579
572
|
|
|
580
573
|
|
|
581
574
|
</div>
|
|
@@ -749,7 +742,7 @@
|
|
|
749
742
|
</h3><div class="docstring">
|
|
750
743
|
<div class="discussion">
|
|
751
744
|
|
|
752
|
-
<p>Xpath with all elements. Addition
|
|
745
|
+
<p>Xpath with all elements. Addition an ‘*’ to tail of xpath</p>
|
|
753
746
|
|
|
754
747
|
|
|
755
748
|
</div>
|
|
@@ -804,7 +797,7 @@
|
|
|
804
797
|
|
|
805
798
|
<span class='kw'>def</span> <span class='id identifier rubyid_all'>all</span>
|
|
806
799
|
<span class='id identifier rubyid_raise'>raise</span> <span class='const'><span class='object_link'><a href="Jini/InvalidPath.html" title="Jini::InvalidPath (class)">InvalidPath</a></span></span><span class='comma'>,</span> <span class='tstring'><span class='tstring_beg'>'</span><span class='tstring_content'>You cannot add all tag after attr!</span><span class='tstring_end'>'</span></span> <span class='kw'>if</span> <span class='ivar'>@head</span><span class='lbracket'>[</span><span class='op'>-</span><span class='int'>1</span><span class='rbracket'>]</span><span class='period'>.</span><span class='id identifier rubyid_eql?'>eql?</span><span class='lparen'>(</span><span class='tstring'><span class='tstring_beg'>'</span><span class='tstring_content'>]</span><span class='tstring_end'>'</span></span><span class='rparen'>)</span>
|
|
807
|
-
<span class='const'><span class='object_link'><a href="" title="Jini (class)">Jini</a></span></span><span class='period'>.</span><span class='id identifier rubyid_new'><span class='object_link'><a href="#initialize-instance_method" title="Jini#initialize (method)">new</a></span></span><span class='lparen'>(</span><span class='id identifier rubyid_add_path'>add_path</span><span class='lparen'>(</span><span class='tstring'><span class='tstring_beg'>'</span><span class='tstring_content'>*</span><span class='tstring_end'>'</span></span><span class='rparen'>)</span><span class='period'>.</span><span class='id identifier rubyid_to_s'>to_s</span><span class='rparen'>)</span>
|
|
800
|
+
<span class='const'><span class='object_link'><a href="" title="Jini (class)">Jini</a></span></span><span class='period'>.</span><span class='id identifier rubyid_new'><span class='object_link'><a href="#initialize-instance_method" title="Jini#initialize (method)">new</a></span></span><span class='lparen'>(</span><span class='id identifier rubyid_add_path'>add_path</span><span class='lparen'>(</span><span class='tstring'><span class='tstring_beg'>'</span><span class='tstring_content'>*</span><span class='tstring_end'>'</span></span><span class='rparen'>)</span><span class='period'>.</span><span class='id identifier rubyid_to_s'>to_s</span><span class='rparen'>)</span>
|
|
808
801
|
<span class='kw'>end</span></pre>
|
|
809
802
|
</td>
|
|
810
803
|
</tr>
|
|
@@ -902,7 +895,7 @@
|
|
|
902
895
|
</h3><div class="docstring">
|
|
903
896
|
<div class="discussion">
|
|
904
897
|
|
|
905
|
-
<p>Access by index. Addition
|
|
898
|
+
<p>Access by index. Addition ‘[index]’ to xpath</p>
|
|
906
899
|
|
|
907
900
|
|
|
908
901
|
</div>
|
|
@@ -981,7 +974,7 @@
|
|
|
981
974
|
</h3><div class="docstring">
|
|
982
975
|
<div class="discussion">
|
|
983
976
|
|
|
984
|
-
<p>Removes attr by name before: ‘/<a href="@k="v"">parent/child</a
|
|
977
|
+
<p>Removes attr by name before: ‘/<a href="@k="v"">parent/child</a>’ after: ‘/parent/child’</p>
|
|
985
978
|
|
|
986
979
|
|
|
987
980
|
</div>
|
|
@@ -1033,24 +1026,24 @@
|
|
|
1033
1026
|
<pre class="lines">
|
|
1034
1027
|
|
|
1035
1028
|
|
|
1029
|
+
117
|
|
1030
|
+
118
|
|
1036
1031
|
119
|
|
1037
1032
|
120
|
|
1038
1033
|
121
|
|
1039
1034
|
122
|
|
1040
1035
|
123
|
|
1041
1036
|
124
|
|
1042
|
-
125
|
|
1043
|
-
126
|
|
1044
|
-
127</pre>
|
|
1037
|
+
125</pre>
|
|
1045
1038
|
</td>
|
|
1046
1039
|
<td>
|
|
1047
|
-
<pre class="code"><span class="info file"># File 'lib/jini.rb', line
|
|
1040
|
+
<pre class="code"><span class="info file"># File 'lib/jini.rb', line 117</span>
|
|
1048
1041
|
|
|
1049
1042
|
<span class='kw'>def</span> <span class='id identifier rubyid_remove_attr'>remove_attr</span><span class='lparen'>(</span><span class='id identifier rubyid_name'>name</span><span class='rparen'>)</span>
|
|
1050
1043
|
<span class='const'><span class='object_link'><a href="" title="Jini (class)">Jini</a></span></span><span class='period'>.</span><span class='id identifier rubyid_new'><span class='object_link'><a href="#initialize-instance_method" title="Jini#initialize (method)">new</a></span></span><span class='lparen'>(</span>
|
|
1051
1044
|
<span class='ivar'>@head</span>
|
|
1052
1045
|
<span class='period'>.</span><span class='id identifier rubyid_gsub'>gsub</span><span class='lparen'>(</span>
|
|
1053
|
-
<span class='tstring'><span class='regexp_beg'>/</span><span class='tstring_content'>(\[
|
|
1046
|
+
<span class='tstring'><span class='regexp_beg'>/</span><span class='tstring_content'>(\[@?</span><span class='embexpr_beg'>#{</span><span class='id identifier rubyid_name'>name</span><span class='embexpr_end'>}</span><span class='tstring_content'>="[^"]+"(\[\]+|\]))</span><span class='regexp_end'>/</span></span><span class='comma'>,</span>
|
|
1054
1047
|
<span class='tstring'><span class='tstring_beg'>'</span><span class='tstring_end'>'</span></span>
|
|
1055
1048
|
<span class='rparen'>)</span>
|
|
1056
1049
|
<span class='rparen'>)</span>
|
|
@@ -1126,15 +1119,13 @@
|
|
|
1126
1119
|
|
|
1127
1120
|
106
|
|
1128
1121
|
107
|
|
1129
|
-
108
|
|
1130
|
-
109</pre>
|
|
1122
|
+
108</pre>
|
|
1131
1123
|
</td>
|
|
1132
1124
|
<td>
|
|
1133
1125
|
<pre class="code"><span class="info file"># File 'lib/jini.rb', line 106</span>
|
|
1134
1126
|
|
|
1135
1127
|
<span class='kw'>def</span> <span class='id identifier rubyid_remove_path'>remove_path</span><span class='lparen'>(</span><span class='id identifier rubyid_node'>node</span><span class='rparen'>)</span>
|
|
1136
|
-
<span class='id identifier
|
|
1137
|
-
<span class='const'><span class='object_link'><a href="" title="Jini (class)">Jini</a></span></span><span class='period'>.</span><span class='id identifier rubyid_new'><span class='object_link'><a href="#initialize-instance_method" title="Jini#initialize (method)">new</a></span></span><span class='lparen'>(</span><span class='id identifier rubyid_copy'>copy</span><span class='period'>.</span><span class='id identifier rubyid_gsub'>gsub</span><span class='lparen'>(</span><span class='tstring'><span class='tstring_beg'>"</span><span class='tstring_content'>/</span><span class='embexpr_beg'>#{</span><span class='id identifier rubyid_node'>node</span><span class='embexpr_end'>}</span><span class='tstring_end'>"</span></span><span class='comma'>,</span> <span class='tstring'><span class='tstring_beg'>'</span><span class='tstring_end'>'</span></span><span class='rparen'>)</span><span class='rparen'>)</span>
|
|
1128
|
+
<span class='const'><span class='object_link'><a href="" title="Jini (class)">Jini</a></span></span><span class='period'>.</span><span class='id identifier rubyid_new'><span class='object_link'><a href="#initialize-instance_method" title="Jini#initialize (method)">new</a></span></span><span class='lparen'>(</span><span class='ivar'>@head</span><span class='period'>.</span><span class='id identifier rubyid_gsub'>gsub</span><span class='lparen'>(</span><span class='tstring'><span class='tstring_beg'>"</span><span class='tstring_content'>/</span><span class='embexpr_beg'>#{</span><span class='id identifier rubyid_node'>node</span><span class='embexpr_end'>}</span><span class='tstring_end'>"</span></span><span class='comma'>,</span> <span class='tstring'><span class='tstring_beg'>'</span><span class='tstring_end'>'</span></span><span class='rparen'>)</span><span class='rparen'>)</span>
|
|
1138
1129
|
<span class='kw'>end</span></pre>
|
|
1139
1130
|
</td>
|
|
1140
1131
|
</tr>
|
|
@@ -1153,7 +1144,7 @@
|
|
|
1153
1144
|
</h3><div class="docstring">
|
|
1154
1145
|
<div class="discussion">
|
|
1155
1146
|
|
|
1156
|
-
<p>Replace all
|
|
1147
|
+
<p>Replace all ‘/’ to ‘::’ symbols if path doesn’t contain invalid symbols for selection</p>
|
|
1157
1148
|
|
|
1158
1149
|
|
|
1159
1150
|
</div>
|
|
@@ -1270,9 +1261,9 @@
|
|
|
1270
1261
|
</div>
|
|
1271
1262
|
|
|
1272
1263
|
<div id="footer">
|
|
1273
|
-
Generated on Thu Sep 15
|
|
1274
|
-
<a href="
|
|
1275
|
-
0.9.
|
|
1264
|
+
Generated on Thu Sep 15 19:58:11 2022 by
|
|
1265
|
+
<a href="https://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
|
|
1266
|
+
0.9.28 (ruby-3.0.0).
|
|
1276
1267
|
</div>
|
|
1277
1268
|
|
|
1278
1269
|
</div>
|
data/doc/_index.html
CHANGED
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
<meta charset="utf-8">
|
|
5
5
|
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
|
6
6
|
<title>
|
|
7
|
-
Documentation by YARD 0.9.
|
|
7
|
+
Documentation by YARD 0.9.28
|
|
8
8
|
|
|
9
9
|
</title>
|
|
10
10
|
|
|
@@ -52,7 +52,7 @@
|
|
|
52
52
|
<div class="clear"></div>
|
|
53
53
|
</div>
|
|
54
54
|
|
|
55
|
-
<div id="content"><h1 class="noborder title">Documentation by YARD 0.9.
|
|
55
|
+
<div id="content"><h1 class="noborder title">Documentation by YARD 0.9.28</h1>
|
|
56
56
|
<div id="listing">
|
|
57
57
|
<h1 class="alphaindex">Alphabetic Index</h1>
|
|
58
58
|
|
|
@@ -112,9 +112,9 @@
|
|
|
112
112
|
</div>
|
|
113
113
|
|
|
114
114
|
<div id="footer">
|
|
115
|
-
Generated on Thu Sep 15
|
|
116
|
-
<a href="
|
|
117
|
-
0.9.
|
|
115
|
+
Generated on Thu Sep 15 19:58:10 2022 by
|
|
116
|
+
<a href="https://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
|
|
117
|
+
0.9.28 (ruby-3.0.0).
|
|
118
118
|
</div>
|
|
119
119
|
|
|
120
120
|
</div>
|
data/doc/file.README.html
CHANGED
|
@@ -6,7 +6,7 @@
|
|
|
6
6
|
<title>
|
|
7
7
|
File: README
|
|
8
8
|
|
|
9
|
-
— Documentation by YARD 0.9.
|
|
9
|
+
— Documentation by YARD 0.9.28
|
|
10
10
|
|
|
11
11
|
</title>
|
|
12
12
|
|
|
@@ -89,9 +89,9 @@ is <em>building</em> XPATHs.</p>
|
|
|
89
89
|
</div></div>
|
|
90
90
|
|
|
91
91
|
<div id="footer">
|
|
92
|
-
Generated on Thu Sep 15
|
|
93
|
-
<a href="
|
|
94
|
-
0.9.
|
|
92
|
+
Generated on Thu Sep 15 19:58:10 2022 by
|
|
93
|
+
<a href="https://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
|
|
94
|
+
0.9.28 (ruby-3.0.0).
|
|
95
95
|
</div>
|
|
96
96
|
|
|
97
97
|
</div>
|
data/doc/frames.html
CHANGED
data/doc/index.html
CHANGED
|
@@ -6,7 +6,7 @@
|
|
|
6
6
|
<title>
|
|
7
7
|
File: README
|
|
8
8
|
|
|
9
|
-
— Documentation by YARD 0.9.
|
|
9
|
+
— Documentation by YARD 0.9.28
|
|
10
10
|
|
|
11
11
|
</title>
|
|
12
12
|
|
|
@@ -89,9 +89,9 @@ is <em>building</em> XPATHs.</p>
|
|
|
89
89
|
</div></div>
|
|
90
90
|
|
|
91
91
|
<div id="footer">
|
|
92
|
-
Generated on Thu Sep 15
|
|
93
|
-
<a href="
|
|
94
|
-
0.9.
|
|
92
|
+
Generated on Thu Sep 15 19:58:10 2022 by
|
|
93
|
+
<a href="https://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
|
|
94
|
+
0.9.28 (ruby-3.0.0).
|
|
95
95
|
</div>
|
|
96
96
|
|
|
97
97
|
</div>
|
|
@@ -6,7 +6,7 @@
|
|
|
6
6
|
<title>
|
|
7
7
|
Top Level Namespace
|
|
8
8
|
|
|
9
|
-
— Documentation by YARD 0.9.
|
|
9
|
+
— Documentation by YARD 0.9.28
|
|
10
10
|
|
|
11
11
|
</title>
|
|
12
12
|
|
|
@@ -100,9 +100,9 @@
|
|
|
100
100
|
</div>
|
|
101
101
|
|
|
102
102
|
<div id="footer">
|
|
103
|
-
Generated on Thu Sep 15
|
|
104
|
-
<a href="
|
|
105
|
-
0.9.
|
|
103
|
+
Generated on Thu Sep 15 19:58:11 2022 by
|
|
104
|
+
<a href="https://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
|
|
105
|
+
0.9.28 (ruby-3.0.0).
|
|
106
106
|
</div>
|
|
107
107
|
|
|
108
108
|
</div>
|
data/jini.gemspec
CHANGED
|
@@ -5,7 +5,7 @@ Gem::Specification.new do |s|
|
|
|
5
5
|
s.required_rubygems_version = Gem::Requirement.new('>= 0') if s.respond_to? :required_rubygems_version=
|
|
6
6
|
s.required_ruby_version = '>=3.0.0'
|
|
7
7
|
s.name = 'jini'
|
|
8
|
-
s.version = '0.0.
|
|
8
|
+
s.version = '0.0.4'
|
|
9
9
|
s.license = 'MIT'
|
|
10
10
|
s.summary = 'Simple Immutable Ruby XPATH Builder'
|
|
11
11
|
s.description = 'Class Jini helps you build a XPATH and then modify its \
|
data/lib/jini.rb
CHANGED
|
@@ -16,7 +16,7 @@
|
|
|
16
16
|
#
|
|
17
17
|
# THE SOFTWARE IS PROVIDED 'AS IS', WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
18
18
|
# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
19
|
-
# FITNESS FOR A PARTICULAR PURPOSE AND
|
|
19
|
+
# FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT. IN NO EVENT SHALL THE
|
|
20
20
|
# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
21
21
|
# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
22
22
|
# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
@@ -32,7 +32,7 @@ class Jini
|
|
|
32
32
|
# When path not valid
|
|
33
33
|
class InvalidPath < StandardError; end
|
|
34
34
|
|
|
35
|
-
# @param head [String]
|
|
35
|
+
# @param head [String]
|
|
36
36
|
def initialize(head = '')
|
|
37
37
|
@head = head
|
|
38
38
|
end
|
|
@@ -51,7 +51,7 @@ class Jini
|
|
|
51
51
|
end
|
|
52
52
|
|
|
53
53
|
# Additional attribute for xpath.
|
|
54
|
-
# [@key="value"]
|
|
54
|
+
# '[@key="value"]'
|
|
55
55
|
# @param key [String] name of attr
|
|
56
56
|
# @param value [String] value of attr
|
|
57
57
|
# @return [Jini] object
|
|
@@ -67,15 +67,15 @@ class Jini
|
|
|
67
67
|
end
|
|
68
68
|
|
|
69
69
|
# Xpath with all elements.
|
|
70
|
-
# Addition
|
|
70
|
+
# Addition an '*' to tail of xpath
|
|
71
71
|
# @return [Jini] object
|
|
72
72
|
def all
|
|
73
73
|
raise InvalidPath, 'You cannot add all tag after attr!' if @head[-1].eql?(']')
|
|
74
|
-
Jini.new(add_path('*').to_s)
|
|
74
|
+
Jini.new(add_path('*').to_s)
|
|
75
75
|
end
|
|
76
76
|
|
|
77
77
|
# Xpath with all named elements.
|
|
78
|
-
# Addition
|
|
78
|
+
# Addition '//node' to xpath
|
|
79
79
|
# @param node [String] name of node
|
|
80
80
|
# @return [Jini] object
|
|
81
81
|
def add_all(node)
|
|
@@ -83,14 +83,14 @@ class Jini
|
|
|
83
83
|
end
|
|
84
84
|
|
|
85
85
|
# Access by index.
|
|
86
|
-
# Addition
|
|
86
|
+
# Addition '[index]' to xpath
|
|
87
87
|
# @param position [Integer] number
|
|
88
88
|
# @return [Jini] object
|
|
89
89
|
def at(position)
|
|
90
90
|
Jini.new("#{@head}[#{position}]")
|
|
91
91
|
end
|
|
92
92
|
|
|
93
|
-
# Replace all
|
|
93
|
+
# Replace all '/' to '::' symbols
|
|
94
94
|
# if path doesn't contain invalid symbols for selection
|
|
95
95
|
# @return [Jini] selection
|
|
96
96
|
def selection
|
|
@@ -109,10 +109,9 @@ class Jini
|
|
|
109
109
|
|
|
110
110
|
# Removes attr by name
|
|
111
111
|
# before:
|
|
112
|
-
#
|
|
113
|
-
# .remove_attr('k')
|
|
112
|
+
# '/parent/child[@k="v"]'
|
|
114
113
|
# after:
|
|
115
|
-
#
|
|
114
|
+
# '/parent/child'
|
|
116
115
|
# @param [String] name of attr
|
|
117
116
|
# @return [Jini] without an attr
|
|
118
117
|
def remove_attr(name)
|