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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 5379b78c4435098f9165b6783ec4ed91b4d4816d06d29a0d1d703c72060129a5
4
- data.tar.gz: 5b4bf01914e5e2eb91bacb4c17b4ed8ba18205ad2e6bb23f01266ed1d18da5ca
3
+ metadata.gz: 846a3a2642216363a51a97176a2bd5a66ce8d8ab2f95fec119b8fa18cbdbc3fa
4
+ data.tar.gz: 18e99fe2ed6124aefb16eae5d9ef965066f0def272ba0696c0a885761ab0902c
5
5
  SHA512:
6
- metadata.gz: 8b1de26cf0a4638dd06956b200424232522d59bfc8ff1e370e8f345866a3bbb5adc506f51e85ef1e38efd84c45e1531e965a6b3205b26c2b0e3959dc13a54c8f
7
- data.tar.gz: 05e135843c3dc17440b7a0c4bdafd7b115329bb8be8711c857c79b8925782b253d996e923aa58a0504efcc563d08a3e219e5db8c4ba45ed1c94a58b6d79186e2
6
+ metadata.gz: 3a5b2ffecd5bceb1f604fec039c491ea2fef6178166e98856b1ac1e80748265c80ec9d3fee74cc0aed1fcf9182062c1e280042bc6c00ba0ff6d5ebfd0c5690ba
7
+ data.tar.gz: 1cc0a3cb04cf1c0d3d7008f0bd4c3bbde753ae3b0a1ae940bc53645fb1606058068080efa583e29e0fbdec1eff238d19bb49c582b3d4f8a34466058ca21b41ca
data/.yardoc/checksums CHANGED
@@ -1 +1 @@
1
- lib/jini.rb 153b27246e75d25eea4308526dc0af51c4206b9d
1
+ lib/jini.rb c940835283ea1ff11567787b6e278213a1735924
Binary file
@@ -6,7 +6,7 @@
6
6
  <title>
7
7
  Exception: Jini::InvalidPath
8
8
 
9
- &mdash; Documentation by YARD 0.9.27
9
+ &mdash; 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 17:17:05 2022 by
129
- <a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
130
- 0.9.27 (ruby-3.0.0).
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
- &mdash; Documentation by YARD 0.9.27
9
+ &mdash; 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>` .remove_attr(’k’) after: ‘/parent/child`.</p>
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 <em>/</em> to <em>::</em> symbols if path doesn’t contain invalid symbols for selection.</p>
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>&#39;&#39;</tt>)</em>
445
445
 
446
446
 
447
- &mdash;
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 <em>//node</em> to xpath</p>
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.</p>
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 a *** to xpath</p>
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'>&#39;</span><span class='tstring_content'>You cannot add all tag after attr!</span><span class='tstring_end'>&#39;</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'>&#39;</span><span class='tstring_content'>]</span><span class='tstring_end'>&#39;</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'>&#39;</span><span class='tstring_content'>*</span><span class='tstring_end'>&#39;</span></span><span class='rparen'>)</span><span class='period'>.</span><span class='id identifier rubyid_to_s'>to_s</span><span class='rparen'>)</span> <span class='kw'>unless</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'>&#39;</span><span class='tstring_content'>]</span><span class='tstring_end'>&#39;</span></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'>&#39;</span><span class='tstring_content'>*</span><span class='tstring_end'>&#39;</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 <em>[index]</em> to xpath</p>
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>` .remove_attr(’k’) after: ‘/parent/child`</p>
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 119</span>
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'>(\[@|</span><span class='embexpr_beg'>#{</span><span class='id identifier rubyid_name'>name</span><span class='embexpr_end'>}</span><span class='tstring_content'>=&quot;[^&quot;]+&quot;|[]+|])</span><span class='regexp_end'>/</span></span><span class='comma'>,</span>
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'>=&quot;[^&quot;]+&quot;(\[\]+|\]))</span><span class='regexp_end'>/</span></span><span class='comma'>,</span>
1054
1047
  <span class='tstring'><span class='tstring_beg'>&#39;</span><span class='tstring_end'>&#39;</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 rubyid_copy'>copy</span> <span class='op'>=</span> <span class='ivar'>@head</span>
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'>&quot;</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'>&quot;</span></span><span class='comma'>,</span> <span class='tstring'><span class='tstring_beg'>&#39;</span><span class='tstring_end'>&#39;</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'>&quot;</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'>&quot;</span></span><span class='comma'>,</span> <span class='tstring'><span class='tstring_beg'>&#39;</span><span class='tstring_end'>&#39;</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 <em>/</em> to <em>::</em> symbols if path doesn’t contain invalid symbols for selection</p>
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 17:17:05 2022 by
1274
- <a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
1275
- 0.9.27 (ruby-3.0.0).
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.27
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.27</h1>
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 17:17:05 2022 by
116
- <a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
117
- 0.9.27 (ruby-3.0.0).
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
- &mdash; Documentation by YARD 0.9.27
9
+ &mdash; 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 17:17:05 2022 by
93
- <a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
94
- 0.9.27 (ruby-3.0.0).
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
@@ -2,7 +2,7 @@
2
2
  <html>
3
3
  <head>
4
4
  <meta charset="utf-8">
5
- <title>Documentation by YARD 0.9.27</title>
5
+ <title>Documentation by YARD 0.9.28</title>
6
6
  </head>
7
7
  <script type="text/javascript">
8
8
  var match = unescape(window.location.hash).match(/^#!(.+)/);
data/doc/index.html CHANGED
@@ -6,7 +6,7 @@
6
6
  <title>
7
7
  File: README
8
8
 
9
- &mdash; Documentation by YARD 0.9.27
9
+ &mdash; 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 17:17:05 2022 by
93
- <a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
94
- 0.9.27 (ruby-3.0.0).
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
- &mdash; Documentation by YARD 0.9.27
9
+ &mdash; 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 17:17:05 2022 by
104
- <a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
105
- 0.9.27 (ruby-3.0.0).
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.3'
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 NONINFRINGEMENT. IN NO EVENT SHALL THE
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] with head of your xpath
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 a *** to xpath
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) unless @head[-1].eql?(']')
74
+ Jini.new(add_path('*').to_s)
75
75
  end
76
76
 
77
77
  # Xpath with all named elements.
78
- # Addition _//node_ to xpath
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 _[index]_ to xpath
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 _/_ to _::_ symbols
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
- # `/parent/child[@k="v"]`
113
- # .remove_attr('k')
112
+ # '/parent/child[@k="v"]'
114
113
  # after:
115
- # `/parent/child`
114
+ # '/parent/child'
116
115
  # @param [String] name of attr
117
116
  # @return [Jini] without an attr
118
117
  def remove_attr(name)
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: jini
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.3
4
+ version: 0.0.4
5
5
  platform: ruby
6
6
  authors:
7
7
  - Ivan Ivanchuck