ovto 0.5.0 → 0.6.2
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.gitmodules +3 -0
- data/CHANGELOG.md +14 -2
- data/Gemfile +2 -3
- data/Gemfile.lock +23 -27
- data/book/SUMMARY.md +2 -0
- data/book/api/actions.md +1 -1
- data/book/api/middleware.md +99 -0
- data/book/api/pure_component.md +3 -0
- data/docs/api/Array.html +190 -0
- data/docs/api/Hash.html +196 -0
- data/docs/api/Ovto/Actions.html +128 -40
- data/docs/api/Ovto/App.html +254 -40
- data/docs/api/Ovto/Component/MoreThanOneNode.html +6 -6
- data/docs/api/Ovto/Component.html +96 -29
- data/docs/api/Ovto/Middleware/Actions.html +428 -0
- data/docs/api/Ovto/Middleware/Base.html +605 -0
- data/docs/api/Ovto/Middleware/Component.html +354 -0
- data/docs/api/Ovto/Middleware.html +286 -0
- data/docs/api/Ovto/PureComponent/StateIsNotAvailable.html +6 -6
- data/docs/api/Ovto/PureComponent.html +11 -11
- data/docs/api/Ovto/Runtime.html +7 -7
- data/docs/api/Ovto/State/MissingValue.html +6 -6
- data/docs/api/Ovto/State/{UnknownKey.html → UnknownStateKey.html} +11 -11
- data/docs/api/Ovto/State.html +59 -43
- data/docs/api/Ovto/WiredActionSet.html +636 -0
- data/docs/api/Ovto/WiredActions.html +78 -35
- data/docs/api/Ovto.html +223 -30
- data/docs/api/_index.html +77 -11
- data/docs/api/actions.html +29 -3
- data/docs/api/app.html +28 -2
- data/docs/api/class_list.html +3 -3
- data/docs/api/component.html +30 -4
- data/docs/api/css/style.css +3 -2
- data/docs/api/fetch.html +30 -4
- data/docs/api/file.README.html +76 -78
- data/docs/api/file_list.html +2 -2
- data/docs/api/frames.html +2 -2
- data/docs/api/index.html +76 -78
- data/docs/api/js/app.js +14 -3
- data/docs/api/method_list.html +303 -31
- data/docs/api/middleware.html +498 -0
- data/docs/api/pure_component.html +428 -0
- data/docs/api/state.html +28 -2
- data/docs/api/top-level-namespace.html +11 -9
- data/docs/guides/debugging.html +28 -2
- data/docs/guides/development.html +28 -2
- data/docs/guides/install.html +28 -2
- data/docs/guides/tutorial.html +28 -2
- data/docs/index.html +28 -2
- data/docs/search_index.json +1 -1
- data/examples/sinatra/Gemfile +2 -0
- data/examples/sinatra/Gemfile.lock +32 -30
- data/examples/sinatra/app.rb +1 -4
- data/examples/sinatra/config.ru +6 -6
- data/examples/static/Gemfile.lock +9 -9
- data/lib/ovto/actions.rb +11 -0
- data/lib/ovto/app.rb +37 -13
- data/lib/ovto/component.rb +130 -67
- data/lib/ovto/middleware.rb +121 -0
- data/lib/ovto/pure_component.rb +1 -1
- data/lib/ovto/state.rb +13 -5
- data/lib/ovto/version.rb +1 -1
- data/lib/ovto/wired_action_set.rb +40 -0
- data/lib/ovto/wired_actions.rb +49 -11
- data/lib/ovto.rb +26 -0
- data/ovto.gemspec +1 -1
- metadata +21 -11
- data/docs/api/pure_component.md +0 -27
@@ -6,15 +6,15 @@
|
|
6
6
|
<title>
|
7
7
|
Class: Ovto::PureComponent
|
8
8
|
|
9
|
-
— Documentation by YARD 0.9.
|
9
|
+
— Documentation by YARD 0.9.26
|
10
10
|
|
11
11
|
</title>
|
12
12
|
|
13
|
-
<link rel="stylesheet" href="../css/style.css" type="text/css"
|
13
|
+
<link rel="stylesheet" href="../css/style.css" type="text/css" />
|
14
14
|
|
15
|
-
<link rel="stylesheet" href="../css/common.css" type="text/css"
|
15
|
+
<link rel="stylesheet" href="../css/common.css" type="text/css" />
|
16
16
|
|
17
|
-
<script type="text/javascript"
|
17
|
+
<script type="text/javascript">
|
18
18
|
pathId = "Ovto::PureComponent";
|
19
19
|
relpath = '../';
|
20
20
|
</script>
|
@@ -151,7 +151,7 @@
|
|
151
151
|
<li class="public ">
|
152
152
|
<span class="summary_signature">
|
153
153
|
|
154
|
-
<a href="#initialize-instance_method" title="#initialize (instance method)">#<strong>initialize</strong>(
|
154
|
+
<a href="#initialize-instance_method" title="#initialize (instance method)">#<strong>initialize</strong>(*args) ⇒ PureComponent </a>
|
155
155
|
|
156
156
|
|
157
157
|
|
@@ -209,14 +209,14 @@
|
|
209
209
|
|
210
210
|
|
211
211
|
<h3 class="inherited">Methods inherited from <span class='object_link'><a href="Component.html" title="Ovto::Component (class)">Component</a></span></h3>
|
212
|
-
<p class="inherited"><span class='object_link'><a href="Component.html#hash_to_js_obj-class_method" title="Ovto::Component.hash_to_js_obj (method)">hash_to_js_obj</a></span>, <span class='object_link'><a href="Component.html#render-instance_method" title="Ovto::Component#render (method)">#render</a></span></p>
|
212
|
+
<p class="inherited"><span class='object_link'><a href="Component.html#hash_to_js_obj-class_method" title="Ovto::Component.hash_to_js_obj (method)">hash_to_js_obj</a></span>, <span class='object_link'><a href="Component.html#middleware_name-class_method" title="Ovto::Component.middleware_name (method)">middleware_name</a></span>, <span class='object_link'><a href="Component.html#render-instance_method" title="Ovto::Component#render (method)">#render</a></span></p>
|
213
213
|
<div id="constructor_details" class="method_details_list">
|
214
214
|
<h2>Constructor Details</h2>
|
215
215
|
|
216
216
|
<div class="method_details first">
|
217
217
|
<h3 class="signature first" id="initialize-instance_method">
|
218
218
|
|
219
|
-
#<strong>initialize</strong>(
|
219
|
+
#<strong>initialize</strong>(*args) ⇒ <tt><span class='object_link'><a href="" title="Ovto::PureComponent (class)">PureComponent</a></span></tt>
|
220
220
|
|
221
221
|
|
222
222
|
|
@@ -225,7 +225,7 @@
|
|
225
225
|
</h3><div class="docstring">
|
226
226
|
<div class="discussion">
|
227
227
|
|
228
|
-
<p>Returns a new instance of PureComponent
|
228
|
+
<p>Returns a new instance of PureComponent.</p>
|
229
229
|
|
230
230
|
|
231
231
|
</div>
|
@@ -248,7 +248,7 @@
|
|
248
248
|
<td>
|
249
249
|
<pre class="code"><span class="info file"># File 'lib/ovto/pure_component.rb', line 5</span>
|
250
250
|
|
251
|
-
<span class='kw'>def</span> <span class='id identifier rubyid_initialize'>initialize</span><span class='lparen'>(</span><span class='id identifier
|
251
|
+
<span class='kw'>def</span> <span class='id identifier rubyid_initialize'>initialize</span><span class='lparen'>(</span><span class='op'>*</span><span class='id identifier rubyid_args'>args</span><span class='rparen'>)</span>
|
252
252
|
<span class='kw'>super</span>
|
253
253
|
<span class='ivar'>@prev_props</span> <span class='op'>=</span> <span class='kw'>nil</span>
|
254
254
|
<span class='ivar'>@cache</span> <span class='op'>=</span> <span class='kw'>nil</span>
|
@@ -358,9 +358,9 @@
|
|
358
358
|
</div>
|
359
359
|
|
360
360
|
<div id="footer">
|
361
|
-
Generated on
|
361
|
+
Generated on Fri Oct 22 08:18:18 2021 by
|
362
362
|
<a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
|
363
|
-
0.9.
|
363
|
+
0.9.26 (ruby-3.0.2).
|
364
364
|
</div>
|
365
365
|
|
366
366
|
</div>
|
data/docs/api/Ovto/Runtime.html
CHANGED
@@ -6,15 +6,15 @@
|
|
6
6
|
<title>
|
7
7
|
Class: Ovto::Runtime
|
8
8
|
|
9
|
-
— Documentation by YARD 0.9.
|
9
|
+
— Documentation by YARD 0.9.26
|
10
10
|
|
11
11
|
</title>
|
12
12
|
|
13
|
-
<link rel="stylesheet" href="../css/style.css" type="text/css"
|
13
|
+
<link rel="stylesheet" href="../css/style.css" type="text/css" />
|
14
14
|
|
15
|
-
<link rel="stylesheet" href="../css/common.css" type="text/css"
|
15
|
+
<link rel="stylesheet" href="../css/common.css" type="text/css" />
|
16
16
|
|
17
|
-
<script type="text/javascript"
|
17
|
+
<script type="text/javascript">
|
18
18
|
pathId = "Ovto::Runtime";
|
19
19
|
relpath = '../';
|
20
20
|
</script>
|
@@ -202,7 +202,7 @@
|
|
202
202
|
</h3><div class="docstring">
|
203
203
|
<div class="discussion">
|
204
204
|
|
205
|
-
<p>Returns a new instance of Runtime
|
205
|
+
<p>Returns a new instance of Runtime.</p>
|
206
206
|
|
207
207
|
|
208
208
|
</div>
|
@@ -313,9 +313,9 @@
|
|
313
313
|
</div>
|
314
314
|
|
315
315
|
<div id="footer">
|
316
|
-
Generated on
|
316
|
+
Generated on Fri Oct 22 08:18:18 2021 by
|
317
317
|
<a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
|
318
|
-
0.9.
|
318
|
+
0.9.26 (ruby-3.0.2).
|
319
319
|
</div>
|
320
320
|
|
321
321
|
</div>
|
@@ -6,15 +6,15 @@
|
|
6
6
|
<title>
|
7
7
|
Exception: Ovto::State::MissingValue
|
8
8
|
|
9
|
-
— Documentation by YARD 0.9.
|
9
|
+
— Documentation by YARD 0.9.26
|
10
10
|
|
11
11
|
</title>
|
12
12
|
|
13
|
-
<link rel="stylesheet" href="../../css/style.css" type="text/css"
|
13
|
+
<link rel="stylesheet" href="../../css/style.css" type="text/css" />
|
14
14
|
|
15
|
-
<link rel="stylesheet" href="../../css/common.css" type="text/css"
|
15
|
+
<link rel="stylesheet" href="../../css/common.css" type="text/css" />
|
16
16
|
|
17
|
-
<script type="text/javascript"
|
17
|
+
<script type="text/javascript">
|
18
18
|
pathId = "Ovto::State::MissingValue";
|
19
19
|
relpath = '../../';
|
20
20
|
</script>
|
@@ -125,9 +125,9 @@
|
|
125
125
|
</div>
|
126
126
|
|
127
127
|
<div id="footer">
|
128
|
-
Generated on
|
128
|
+
Generated on Fri Oct 22 08:18:18 2021 by
|
129
129
|
<a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
|
130
|
-
0.9.
|
130
|
+
0.9.26 (ruby-3.0.2).
|
131
131
|
</div>
|
132
132
|
|
133
133
|
</div>
|
@@ -4,18 +4,18 @@
|
|
4
4
|
<meta charset="utf-8">
|
5
5
|
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
6
6
|
<title>
|
7
|
-
Exception: Ovto::State::
|
7
|
+
Exception: Ovto::State::UnknownStateKey
|
8
8
|
|
9
|
-
— Documentation by YARD 0.9.
|
9
|
+
— Documentation by YARD 0.9.26
|
10
10
|
|
11
11
|
</title>
|
12
12
|
|
13
|
-
<link rel="stylesheet" href="../../css/style.css" type="text/css"
|
13
|
+
<link rel="stylesheet" href="../../css/style.css" type="text/css" />
|
14
14
|
|
15
|
-
<link rel="stylesheet" href="../../css/common.css" type="text/css"
|
15
|
+
<link rel="stylesheet" href="../../css/common.css" type="text/css" />
|
16
16
|
|
17
|
-
<script type="text/javascript"
|
18
|
-
pathId = "Ovto::State::
|
17
|
+
<script type="text/javascript">
|
18
|
+
pathId = "Ovto::State::UnknownStateKey";
|
19
19
|
relpath = '../../';
|
20
20
|
</script>
|
21
21
|
|
@@ -39,7 +39,7 @@
|
|
39
39
|
<a href="../../_index.html">Index (U)</a> »
|
40
40
|
<span class='title'><span class='object_link'><a href="../../Ovto.html" title="Ovto (module)">Ovto</a></span></span> » <span class='title'><span class='object_link'><a href="../State.html" title="Ovto::State (class)">State</a></span></span>
|
41
41
|
»
|
42
|
-
<span class="title">
|
42
|
+
<span class="title">UnknownStateKey</span>
|
43
43
|
|
44
44
|
</div>
|
45
45
|
|
@@ -59,7 +59,7 @@
|
|
59
59
|
<div class="clear"></div>
|
60
60
|
</div>
|
61
61
|
|
62
|
-
<div id="content"><h1>Exception: Ovto::State::
|
62
|
+
<div id="content"><h1>Exception: Ovto::State::UnknownStateKey
|
63
63
|
|
64
64
|
|
65
65
|
|
@@ -76,7 +76,7 @@
|
|
76
76
|
|
77
77
|
<li class="next">StandardError</li>
|
78
78
|
|
79
|
-
<li class="next">Ovto::State::
|
79
|
+
<li class="next">Ovto::State::UnknownStateKey</li>
|
80
80
|
|
81
81
|
</ul>
|
82
82
|
<a href="#" class="inheritanceTree">show all</a>
|
@@ -125,9 +125,9 @@
|
|
125
125
|
</div>
|
126
126
|
|
127
127
|
<div id="footer">
|
128
|
-
Generated on
|
128
|
+
Generated on Fri Oct 22 08:18:18 2021 by
|
129
129
|
<a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
|
130
|
-
0.9.
|
130
|
+
0.9.26 (ruby-3.0.2).
|
131
131
|
</div>
|
132
132
|
|
133
133
|
</div>
|
data/docs/api/Ovto/State.html
CHANGED
@@ -6,15 +6,15 @@
|
|
6
6
|
<title>
|
7
7
|
Class: Ovto::State
|
8
8
|
|
9
|
-
— Documentation by YARD 0.9.
|
9
|
+
— Documentation by YARD 0.9.26
|
10
10
|
|
11
11
|
</title>
|
12
12
|
|
13
|
-
<link rel="stylesheet" href="../css/style.css" type="text/css"
|
13
|
+
<link rel="stylesheet" href="../css/style.css" type="text/css" />
|
14
14
|
|
15
|
-
<link rel="stylesheet" href="../css/common.css" type="text/css"
|
15
|
+
<link rel="stylesheet" href="../css/common.css" type="text/css" />
|
16
16
|
|
17
|
-
<script type="text/javascript"
|
17
|
+
<script type="text/javascript">
|
18
18
|
pathId = "Ovto::State";
|
19
19
|
relpath = '../';
|
20
20
|
</script>
|
@@ -105,7 +105,7 @@
|
|
105
105
|
|
106
106
|
|
107
107
|
|
108
|
-
<strong class="classes">Classes:</strong> <span class='object_link'><a href="State/MissingValue.html" title="Ovto::State::MissingValue (class)">MissingValue</a></span>, <span class='object_link'><a href="State/
|
108
|
+
<strong class="classes">Classes:</strong> <span class='object_link'><a href="State/MissingValue.html" title="Ovto::State::MissingValue (class)">MissingValue</a></span>, <span class='object_link'><a href="State/UnknownStateKey.html" title="Ovto::State::UnknownStateKey (class)">UnknownStateKey</a></span>
|
109
109
|
|
110
110
|
|
111
111
|
</p>
|
@@ -399,7 +399,7 @@
|
|
399
399
|
</h3><div class="docstring">
|
400
400
|
<div class="discussion">
|
401
401
|
|
402
|
-
<p>Returns a new instance of State
|
402
|
+
<p>Returns a new instance of State.</p>
|
403
403
|
|
404
404
|
|
405
405
|
</div>
|
@@ -427,7 +427,15 @@
|
|
427
427
|
39
|
428
428
|
40
|
429
429
|
41
|
430
|
-
42
|
430
|
+
42
|
431
|
+
43
|
432
|
+
44
|
433
|
+
45
|
434
|
+
46
|
435
|
+
47
|
436
|
+
48
|
437
|
+
49
|
438
|
+
50</pre>
|
431
439
|
</td>
|
432
440
|
<td>
|
433
441
|
<pre class="code"><span class="info file"># File 'lib/ovto/state.rb', line 28</span>
|
@@ -435,15 +443,23 @@
|
|
435
443
|
<span class='kw'>def</span> <span class='id identifier rubyid_initialize'>initialize</span><span class='lparen'>(</span><span class='id identifier rubyid_hash'>hash</span> <span class='op'>=</span> <span class='lbrace'>{</span><span class='rbrace'>}</span><span class='rparen'>)</span>
|
436
444
|
<span class='id identifier rubyid_unknown_keys'>unknown_keys</span> <span class='op'>=</span> <span class='id identifier rubyid_hash'>hash</span><span class='period'>.</span><span class='id identifier rubyid_keys'>keys</span> <span class='op'>-</span> <span class='kw'>self</span><span class='period'>.</span><span class='id identifier rubyid_class'>class</span><span class='period'>.</span><span class='id identifier rubyid_item_specs'>item_specs</span><span class='period'>.</span><span class='id identifier rubyid_map'>map</span><span class='lparen'>(</span><span class='op'>&</span><span class='symbol'>:first</span><span class='rparen'>)</span>
|
437
445
|
<span class='kw'>if</span> <span class='id identifier rubyid_unknown_keys'>unknown_keys</span><span class='period'>.</span><span class='id identifier rubyid_any?'>any?</span>
|
438
|
-
<span class='id identifier rubyid_raise'>raise</span> <span class='const'><span class='object_link'><a href="State/
|
446
|
+
<span class='id identifier rubyid_raise'>raise</span> <span class='const'><span class='object_link'><a href="State/UnknownStateKey.html" title="Ovto::State::UnknownStateKey (class)">UnknownStateKey</a></span></span><span class='comma'>,</span> <span class='tstring'><span class='tstring_beg'>"</span><span class='tstring_content'>unknown key(s): </span><span class='embexpr_beg'>#{</span><span class='id identifier rubyid_unknown_keys'>unknown_keys</span><span class='period'>.</span><span class='id identifier rubyid_inspect'>inspect</span><span class='embexpr_end'>}</span><span class='tstring_end'>"</span></span>
|
439
447
|
<span class='kw'>end</span>
|
440
448
|
|
441
449
|
<span class='ivar'>@values</span> <span class='op'>=</span> <span class='kw'>self</span><span class='period'>.</span><span class='id identifier rubyid_class'>class</span><span class='period'>.</span><span class='id identifier rubyid_item_specs'>item_specs</span><span class='period'>.</span><span class='id identifier rubyid_map'>map</span><span class='lbrace'>{</span><span class='op'>|</span><span class='id identifier rubyid_name'>name</span><span class='comma'>,</span> <span class='id identifier rubyid_options'>options</span><span class='op'>|</span>
|
442
|
-
<span class='kw'>if</span> <span class='op'>!</span><span class='id identifier rubyid_hash'>hash</span><span class='period'>.</span><span class='id identifier rubyid_key?'>key?</span><span class='lparen'>(</span><span class='id identifier rubyid_name'>name</span><span class='rparen'>)</span> <span class='op'>&&</span> <span class='op'>!</span><span class='id identifier rubyid_options'>options</span><span class='period'>.</span><span class='id identifier rubyid_key?'>key?</span><span class='lparen'>(</span><span class='symbol'>:default</span><span class='rparen'>)</span>
|
450
|
+
<span class='kw'>if</span> <span class='op'>!</span><span class='id identifier rubyid_hash'>hash</span><span class='period'>.</span><span class='id identifier rubyid_key?'>key?</span><span class='lparen'>(</span><span class='id identifier rubyid_name'>name</span><span class='rparen'>)</span> <span class='op'>&&</span> <span class='op'>!</span><span class='id identifier rubyid_options'>options</span><span class='period'>.</span><span class='id identifier rubyid_key?'>key?</span><span class='lparen'>(</span><span class='symbol'>:default</span><span class='rparen'>)</span> <span class='op'>&&</span> <span class='op'>!</span><span class='id identifier rubyid_options'>options</span><span class='period'>.</span><span class='id identifier rubyid_key?'>key?</span><span class='lparen'>(</span><span class='symbol'>:default_proc</span><span class='rparen'>)</span>
|
443
451
|
<span class='id identifier rubyid_raise'>raise</span> <span class='const'><span class='object_link'><a href="State/MissingValue.html" title="Ovto::State::MissingValue (class)">MissingValue</a></span></span><span class='comma'>,</span> <span class='tstring'><span class='tstring_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'> is mandatory for </span><span class='embexpr_beg'>#{</span><span class='kw'>self</span><span class='period'>.</span><span class='id identifier rubyid_class'>class</span><span class='period'>.</span><span class='id identifier rubyid_name'>name</span><span class='embexpr_end'>}</span><span class='tstring_content'>.new</span><span class='tstring_end'>"</span></span>
|
444
452
|
<span class='kw'>end</span>
|
445
453
|
<span class='comment'># Note that `hash[key]` may be false or nil
|
446
|
-
</span> <span class='id identifier rubyid_value'>value</span> <span class='op'>=</span> <span class='id identifier rubyid_hash'>hash</span><span class='period'>.</span><span class='id identifier rubyid_key?'>key?</span><span class='lparen'>(</span><span class='id identifier rubyid_name'>name</span><span class='rparen'>)</span>
|
454
|
+
</span> <span class='id identifier rubyid_value'>value</span> <span class='op'>=</span> <span class='kw'>if</span> <span class='id identifier rubyid_hash'>hash</span><span class='period'>.</span><span class='id identifier rubyid_key?'>key?</span><span class='lparen'>(</span><span class='id identifier rubyid_name'>name</span><span class='rparen'>)</span>
|
455
|
+
<span class='id identifier rubyid_hash'>hash</span><span class='lbracket'>[</span><span class='id identifier rubyid_name'>name</span><span class='rbracket'>]</span>
|
456
|
+
<span class='kw'>elsif</span> <span class='id identifier rubyid_options'>options</span><span class='period'>.</span><span class='id identifier rubyid_key?'>key?</span><span class='lparen'>(</span><span class='symbol'>:default</span><span class='rparen'>)</span>
|
457
|
+
<span class='id identifier rubyid_options'>options</span><span class='lbracket'>[</span><span class='symbol'>:default</span><span class='rbracket'>]</span>
|
458
|
+
<span class='kw'>elsif</span> <span class='id identifier rubyid_options'>options</span><span class='period'>.</span><span class='id identifier rubyid_key?'>key?</span><span class='lparen'>(</span><span class='symbol'>:default_proc</span><span class='rparen'>)</span>
|
459
|
+
<span class='id identifier rubyid_options'>options</span><span class='lbracket'>[</span><span class='symbol'>:default_proc</span><span class='rbracket'>]</span><span class='period'>.</span><span class='id identifier rubyid_call'>call</span>
|
460
|
+
<span class='kw'>else</span>
|
461
|
+
<span class='id identifier rubyid_raise'>raise</span> <span class='tstring'><span class='tstring_beg'>"</span><span class='tstring_content'>must not happen</span><span class='tstring_end'>"</span></span>
|
462
|
+
<span class='kw'>end</span>
|
447
463
|
<span class='lbracket'>[</span><span class='id identifier rubyid_name'>name</span><span class='comma'>,</span> <span class='id identifier rubyid_value'>value</span><span class='rbracket'>]</span>
|
448
464
|
<span class='rbrace'>}</span><span class='period'>.</span><span class='id identifier rubyid_to_h'>to_h</span>
|
449
465
|
<span class='kw'>end</span></pre>
|
@@ -471,7 +487,7 @@
|
|
471
487
|
</h3><div class="docstring">
|
472
488
|
<div class="discussion">
|
473
489
|
|
474
|
-
<p>Returns the value of attribute values
|
490
|
+
<p>Returns the value of attribute values.</p>
|
475
491
|
|
476
492
|
|
477
493
|
</div>
|
@@ -485,12 +501,12 @@
|
|
485
501
|
<pre class="lines">
|
486
502
|
|
487
503
|
|
488
|
-
|
489
|
-
|
490
|
-
|
504
|
+
51
|
505
|
+
52
|
506
|
+
53</pre>
|
491
507
|
</td>
|
492
508
|
<td>
|
493
|
-
<pre class="code"><span class="info file"># File 'lib/ovto/state.rb', line
|
509
|
+
<pre class="code"><span class="info file"># File 'lib/ovto/state.rb', line 51</span>
|
494
510
|
|
495
511
|
<span class='kw'>def</span> <span class='id identifier rubyid_values'>values</span>
|
496
512
|
<span class='ivar'>@values</span>
|
@@ -587,7 +603,7 @@
|
|
587
603
|
<pre class="code"><span class="info file"># File 'lib/ovto/state.rb', line 14</span>
|
588
604
|
|
589
605
|
<span class='kw'>def</span> <span class='kw'>self</span><span class='period'>.</span><span class='id identifier rubyid_item'>item</span><span class='lparen'>(</span><span class='id identifier rubyid_name'>name</span><span class='comma'>,</span> <span class='id identifier rubyid_options'>options</span><span class='op'>=</span><span class='lbrace'>{</span><span class='rbrace'>}</span><span class='rparen'>)</span>
|
590
|
-
<span class='kw'>unless</span> <span class='id identifier rubyid_options'>options</span><span class='period'>.</span><span class='id identifier rubyid_is_a?'>is_a?</span><span class='lparen'>(</span><span class='const'>Hash</span><span class='rparen'>)</span>
|
606
|
+
<span class='kw'>unless</span> <span class='id identifier rubyid_options'>options</span><span class='period'>.</span><span class='id identifier rubyid_is_a?'>is_a?</span><span class='lparen'>(</span><span class='const'><span class='object_link'><a href="../Hash.html" title="Hash (class)">Hash</a></span></span><span class='rparen'>)</span>
|
591
607
|
<span class='id identifier rubyid_raise'>raise</span> <span class='const'>ArgumentError</span><span class='comma'>,</span> <span class='tstring'><span class='tstring_beg'>"</span><span class='tstring_content'>options must be a Hash: item :</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='embexpr_beg'>#{</span><span class='id identifier rubyid_options'>options</span><span class='period'>.</span><span class='id identifier rubyid_inspect'>inspect</span><span class='embexpr_end'>}</span><span class='tstring_end'>"</span></span>
|
592
608
|
<span class='kw'>end</span>
|
593
609
|
<span class='ivar'>@item_specs</span> <span class='op'><<</span> <span class='lbracket'>[</span><span class='id identifier rubyid_name'>name</span><span class='comma'>,</span> <span class='id identifier rubyid_options'>options</span><span class='rbracket'>]</span>
|
@@ -672,12 +688,12 @@
|
|
672
688
|
<pre class="lines">
|
673
689
|
|
674
690
|
|
675
|
-
|
676
|
-
|
677
|
-
|
691
|
+
68
|
692
|
+
69
|
693
|
+
70</pre>
|
678
694
|
</td>
|
679
695
|
<td>
|
680
|
-
<pre class="code"><span class="info file"># File 'lib/ovto/state.rb', line
|
696
|
+
<pre class="code"><span class="info file"># File 'lib/ovto/state.rb', line 68</span>
|
681
697
|
|
682
698
|
<span class='kw'>def</span> <span class='op'>==</span><span class='lparen'>(</span><span class='id identifier rubyid_other'>other</span><span class='rparen'>)</span>
|
683
699
|
<span class='id identifier rubyid_other'>other</span><span class='period'>.</span><span class='id identifier rubyid_is_a?'>is_a?</span><span class='lparen'>(</span><span class='const'><span class='object_link'><a href="" title="Ovto::State (class)">State</a></span></span><span class='rparen'>)</span> <span class='op'>&&</span> <span class='kw'>self</span><span class='period'>.</span><span class='id identifier rubyid_values'>values</span> <span class='op'>==</span> <span class='id identifier rubyid_other'>other</span><span class='period'>.</span><span class='id identifier rubyid_values'>values</span>
|
@@ -713,12 +729,12 @@
|
|
713
729
|
<pre class="lines">
|
714
730
|
|
715
731
|
|
716
|
-
|
717
|
-
|
718
|
-
|
732
|
+
63
|
733
|
+
64
|
734
|
+
65</pre>
|
719
735
|
</td>
|
720
736
|
<td>
|
721
|
-
<pre class="code"><span class="info file"># File 'lib/ovto/state.rb', line
|
737
|
+
<pre class="code"><span class="info file"># File 'lib/ovto/state.rb', line 63</span>
|
722
738
|
|
723
739
|
<span class='kw'>def</span> <span class='op'>[]</span><span class='lparen'>(</span><span class='id identifier rubyid_key'>key</span><span class='rparen'>)</span>
|
724
740
|
<span class='ivar'>@values</span><span class='lbracket'>[</span><span class='id identifier rubyid_key'>key</span><span class='rbracket'>]</span>
|
@@ -743,12 +759,12 @@
|
|
743
759
|
<pre class="lines">
|
744
760
|
|
745
761
|
|
746
|
-
|
747
|
-
|
748
|
-
|
762
|
+
76
|
763
|
+
77
|
764
|
+
78</pre>
|
749
765
|
</td>
|
750
766
|
<td>
|
751
|
-
<pre class="code"><span class="info file"># File 'lib/ovto/state.rb', line
|
767
|
+
<pre class="code"><span class="info file"># File 'lib/ovto/state.rb', line 76</span>
|
752
768
|
|
753
769
|
<span class='kw'>def</span> <span class='id identifier rubyid_inspect'>inspect</span>
|
754
770
|
<span class='tstring'><span class='tstring_beg'>"</span><span class='tstring_content'>#<</span><span class='embexpr_beg'>#{</span><span class='kw'>self</span><span class='period'>.</span><span class='id identifier rubyid_class'>class</span><span class='period'>.</span><span class='id identifier rubyid_name'>name</span><span class='embexpr_end'>}</span><span class='tstring_content'>:</span><span class='embexpr_beg'>#{</span><span class='id identifier rubyid_object_id'>object_id</span><span class='embexpr_end'>}</span><span class='tstring_content'> </span><span class='embexpr_beg'>#{</span><span class='ivar'>@values</span><span class='period'>.</span><span class='id identifier rubyid_inspect'>inspect</span><span class='embexpr_end'>}</span><span class='tstring_content'>></span><span class='tstring_end'>"</span></span>
|
@@ -784,21 +800,21 @@
|
|
784
800
|
<pre class="lines">
|
785
801
|
|
786
802
|
|
787
|
-
|
788
|
-
|
789
|
-
|
790
|
-
|
791
|
-
|
792
|
-
|
793
|
-
|
803
|
+
54
|
804
|
+
55
|
805
|
+
56
|
806
|
+
57
|
807
|
+
58
|
808
|
+
59
|
809
|
+
60</pre>
|
794
810
|
</td>
|
795
811
|
<td>
|
796
|
-
<pre class="code"><span class="info file"># File 'lib/ovto/state.rb', line
|
812
|
+
<pre class="code"><span class="info file"># File 'lib/ovto/state.rb', line 54</span>
|
797
813
|
|
798
814
|
<span class='kw'>def</span> <span class='id identifier rubyid_merge'>merge</span><span class='lparen'>(</span><span class='id identifier rubyid_hash'>hash</span><span class='rparen'>)</span>
|
799
815
|
<span class='id identifier rubyid_unknown_keys'>unknown_keys</span> <span class='op'>=</span> <span class='id identifier rubyid_hash'>hash</span><span class='period'>.</span><span class='id identifier rubyid_keys'>keys</span> <span class='op'>-</span> <span class='kw'>self</span><span class='period'>.</span><span class='id identifier rubyid_class'>class</span><span class='period'>.</span><span class='id identifier rubyid_item_specs'>item_specs</span><span class='period'>.</span><span class='id identifier rubyid_map'>map</span><span class='lparen'>(</span><span class='op'>&</span><span class='symbol'>:first</span><span class='rparen'>)</span>
|
800
816
|
<span class='kw'>if</span> <span class='id identifier rubyid_unknown_keys'>unknown_keys</span><span class='period'>.</span><span class='id identifier rubyid_any?'>any?</span>
|
801
|
-
<span class='id identifier rubyid_raise'>raise</span> <span class='const'><span class='object_link'><a href="State/
|
817
|
+
<span class='id identifier rubyid_raise'>raise</span> <span class='const'><span class='object_link'><a href="State/UnknownStateKey.html" title="Ovto::State::UnknownStateKey (class)">UnknownStateKey</a></span></span><span class='comma'>,</span> <span class='tstring'><span class='tstring_beg'>"</span><span class='tstring_content'>unknown key(s): </span><span class='embexpr_beg'>#{</span><span class='id identifier rubyid_unknown_keys'>unknown_keys</span><span class='period'>.</span><span class='id identifier rubyid_inspect'>inspect</span><span class='embexpr_end'>}</span><span class='tstring_end'>"</span></span>
|
802
818
|
<span class='kw'>end</span>
|
803
819
|
<span class='kw'>self</span><span class='period'>.</span><span class='id identifier rubyid_class'>class</span><span class='period'>.</span><span class='id identifier rubyid_new'>new</span><span class='lparen'>(</span><span class='ivar'>@values</span><span class='period'>.</span><span class='id identifier rubyid_merge'>merge</span><span class='lparen'>(</span><span class='id identifier rubyid_hash'>hash</span><span class='rparen'>)</span><span class='rparen'>)</span>
|
804
820
|
<span class='kw'>end</span></pre>
|
@@ -822,12 +838,12 @@
|
|
822
838
|
<pre class="lines">
|
823
839
|
|
824
840
|
|
825
|
-
|
826
|
-
|
827
|
-
|
841
|
+
72
|
842
|
+
73
|
843
|
+
74</pre>
|
828
844
|
</td>
|
829
845
|
<td>
|
830
|
-
<pre class="code"><span class="info file"># File 'lib/ovto/state.rb', line
|
846
|
+
<pre class="code"><span class="info file"># File 'lib/ovto/state.rb', line 72</span>
|
831
847
|
|
832
848
|
<span class='kw'>def</span> <span class='id identifier rubyid_to_h'>to_h</span>
|
833
849
|
<span class='ivar'>@values</span>
|
@@ -842,9 +858,9 @@
|
|
842
858
|
</div>
|
843
859
|
|
844
860
|
<div id="footer">
|
845
|
-
Generated on
|
861
|
+
Generated on Fri Oct 22 08:18:18 2021 by
|
846
862
|
<a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
|
847
|
-
0.9.
|
863
|
+
0.9.26 (ruby-3.0.2).
|
848
864
|
</div>
|
849
865
|
|
850
866
|
</div>
|