ovto 0.5.0 → 0.6.2

Sign up to get free protection for your applications and to get access to all the features.
Files changed (69) hide show
  1. checksums.yaml +4 -4
  2. data/.gitmodules +3 -0
  3. data/CHANGELOG.md +14 -2
  4. data/Gemfile +2 -3
  5. data/Gemfile.lock +23 -27
  6. data/book/SUMMARY.md +2 -0
  7. data/book/api/actions.md +1 -1
  8. data/book/api/middleware.md +99 -0
  9. data/book/api/pure_component.md +3 -0
  10. data/docs/api/Array.html +190 -0
  11. data/docs/api/Hash.html +196 -0
  12. data/docs/api/Ovto/Actions.html +128 -40
  13. data/docs/api/Ovto/App.html +254 -40
  14. data/docs/api/Ovto/Component/MoreThanOneNode.html +6 -6
  15. data/docs/api/Ovto/Component.html +96 -29
  16. data/docs/api/Ovto/Middleware/Actions.html +428 -0
  17. data/docs/api/Ovto/Middleware/Base.html +605 -0
  18. data/docs/api/Ovto/Middleware/Component.html +354 -0
  19. data/docs/api/Ovto/Middleware.html +286 -0
  20. data/docs/api/Ovto/PureComponent/StateIsNotAvailable.html +6 -6
  21. data/docs/api/Ovto/PureComponent.html +11 -11
  22. data/docs/api/Ovto/Runtime.html +7 -7
  23. data/docs/api/Ovto/State/MissingValue.html +6 -6
  24. data/docs/api/Ovto/State/{UnknownKey.html → UnknownStateKey.html} +11 -11
  25. data/docs/api/Ovto/State.html +59 -43
  26. data/docs/api/Ovto/WiredActionSet.html +636 -0
  27. data/docs/api/Ovto/WiredActions.html +78 -35
  28. data/docs/api/Ovto.html +223 -30
  29. data/docs/api/_index.html +77 -11
  30. data/docs/api/actions.html +29 -3
  31. data/docs/api/app.html +28 -2
  32. data/docs/api/class_list.html +3 -3
  33. data/docs/api/component.html +30 -4
  34. data/docs/api/css/style.css +3 -2
  35. data/docs/api/fetch.html +30 -4
  36. data/docs/api/file.README.html +76 -78
  37. data/docs/api/file_list.html +2 -2
  38. data/docs/api/frames.html +2 -2
  39. data/docs/api/index.html +76 -78
  40. data/docs/api/js/app.js +14 -3
  41. data/docs/api/method_list.html +303 -31
  42. data/docs/api/middleware.html +498 -0
  43. data/docs/api/pure_component.html +428 -0
  44. data/docs/api/state.html +28 -2
  45. data/docs/api/top-level-namespace.html +11 -9
  46. data/docs/guides/debugging.html +28 -2
  47. data/docs/guides/development.html +28 -2
  48. data/docs/guides/install.html +28 -2
  49. data/docs/guides/tutorial.html +28 -2
  50. data/docs/index.html +28 -2
  51. data/docs/search_index.json +1 -1
  52. data/examples/sinatra/Gemfile +2 -0
  53. data/examples/sinatra/Gemfile.lock +32 -30
  54. data/examples/sinatra/app.rb +1 -4
  55. data/examples/sinatra/config.ru +6 -6
  56. data/examples/static/Gemfile.lock +9 -9
  57. data/lib/ovto/actions.rb +11 -0
  58. data/lib/ovto/app.rb +37 -13
  59. data/lib/ovto/component.rb +130 -67
  60. data/lib/ovto/middleware.rb +121 -0
  61. data/lib/ovto/pure_component.rb +1 -1
  62. data/lib/ovto/state.rb +13 -5
  63. data/lib/ovto/version.rb +1 -1
  64. data/lib/ovto/wired_action_set.rb +40 -0
  65. data/lib/ovto/wired_actions.rb +49 -11
  66. data/lib/ovto.rb +26 -0
  67. data/ovto.gemspec +1 -1
  68. metadata +21 -11
  69. data/docs/api/pure_component.md +0 -27
@@ -6,15 +6,15 @@
6
6
  <title>
7
7
  File: README
8
8
 
9
- &mdash; Documentation by YARD 0.9.19
9
+ &mdash; Documentation by YARD 0.9.26
10
10
 
11
11
  </title>
12
12
 
13
- <link rel="stylesheet" href="css/style.css" type="text/css" charset="utf-8" />
13
+ <link rel="stylesheet" href="css/style.css" type="text/css" />
14
14
 
15
- <link rel="stylesheet" href="css/common.css" type="text/css" charset="utf-8" />
15
+ <link rel="stylesheet" href="css/common.css" type="text/css" />
16
16
 
17
- <script type="text/javascript" charset="utf-8">
17
+ <script type="text/javascript">
18
18
  pathId = "README";
19
19
  relpath = '';
20
20
  </script>
@@ -57,101 +57,99 @@
57
57
  <div class="clear"></div>
58
58
  </div>
59
59
 
60
- <div id="content"><div id='filecontents'><h1>Ovto</h1>
60
+ <div id="content"><div id='filecontents'>
61
+ <h1 id="label-Ovto">Ovto</h1>
61
62
 
62
63
  <p>Client-side web framework for Opal</p>
63
64
 
64
- <p><img src="ovtologo.png" alt="logo"></p>
65
-
66
- <h2>Documents</h2>
67
-
68
- <ul>
69
- <li><a href="https://yhara.github.io/ovto/docs/">Book</a></li>
70
- <li><a href="https://yhara.github.io/ovto/api/">yardoc</a></li>
71
- </ul>
72
-
73
- <h2>Example</h2>
74
-
75
- <p><img src="screenshot.png" alt="screenshot"></p>
76
-
77
- <pre class="code rb"><code class="rb">require &#39;ovto&#39;
78
-
79
- class MyApp &lt; Ovto::App
80
- class State &lt; Ovto::State
81
- item :celsius, default: 0
82
-
83
- def fahrenheit
84
- (celsius * 9 / 5.0) + 32
85
- end
86
- end
87
-
88
- class Actions &lt; Ovto::Actions
89
- def set_celsius(value:)
90
- return {celsius: value}
91
- end
92
-
93
- def set_fahrenheit(value:)
94
- new_celsius = (value - 32) * 5 / 9.0
95
- return {celsius: new_celsius}
96
- end
97
- end
98
-
99
- class MainComponent &lt; Ovto::Component
100
- def render
101
- o &#39;div&#39; do
102
- o &#39;span&#39;, &#39;Celcius:&#39;
103
- o &#39;input&#39;, {
104
- type: &#39;text&#39;,
105
- onchange: -&gt;(e){ actions.set_celsius(value: e.target.value.to_i) },
106
- value: state.celsius
107
- }
108
- o &#39;span&#39;, &#39;Fahrenheit:&#39;
109
- o &#39;input&#39;, {
110
- type: &#39;text&#39;,
111
- onchange: -&gt;(e){ actions.set_fahrenheit(value: e.target.value.to_i) },
112
- value: state.fahrenheit
113
- }
114
- end
115
- end
116
- end
117
- end
118
-
119
- MyApp.run(id: &#39;ovto&#39;)
65
+ <p><img src="ovtologo.png"></p>
66
+
67
+ <h2 id="label-Documents">Documents</h2>
68
+ <ul><li>
69
+ <p><a href="https://yhara.github.io/ovto/docs/">Book</a></p>
70
+ </li><li>
71
+ <p><a href="https://yhara.github.io/ovto/api/">yardoc</a></p>
72
+ </li></ul>
73
+
74
+ <h2 id="label-Example">Example</h2>
75
+
76
+ <p><img src="screenshot.png"></p>
77
+
78
+ <pre class="code ruby"><code class="ruby"><span class='id identifier rubyid_require'>require</span> <span class='tstring'><span class='tstring_beg'>&#39;</span><span class='tstring_content'>ovto</span><span class='tstring_end'>&#39;</span></span>
79
+
80
+ <span class='kw'>class</span> <span class='const'>MyApp</span> <span class='op'>&lt;</span> <span class='const'><span class='object_link'><a href="Ovto.html" title="Ovto (module)">Ovto</a></span></span><span class='op'>::</span><span class='const'><span class='object_link'><a href="Ovto/App.html" title="Ovto::App (class)">App</a></span></span>
81
+ <span class='kw'>class</span> <span class='const'>State</span> <span class='op'>&lt;</span> <span class='const'><span class='object_link'><a href="Ovto.html" title="Ovto (module)">Ovto</a></span></span><span class='op'>::</span><span class='const'><span class='object_link'><a href="Ovto/State.html" title="Ovto::State (class)">State</a></span></span>
82
+ <span class='id identifier rubyid_item'>item</span> <span class='symbol'>:celsius</span><span class='comma'>,</span> <span class='label'>default:</span> <span class='int'>0</span>
83
+
84
+ <span class='kw'>def</span> <span class='id identifier rubyid_fahrenheit'>fahrenheit</span>
85
+ <span class='lparen'>(</span><span class='id identifier rubyid_celsius'>celsius</span> <span class='op'>*</span> <span class='int'>9</span> <span class='op'>/</span> <span class='float'>5.0</span><span class='rparen'>)</span> <span class='op'>+</span> <span class='int'>32</span>
86
+ <span class='kw'>end</span>
87
+ <span class='kw'>end</span>
88
+
89
+ <span class='kw'>class</span> <span class='const'>Actions</span> <span class='op'>&lt;</span> <span class='const'><span class='object_link'><a href="Ovto.html" title="Ovto (module)">Ovto</a></span></span><span class='op'>::</span><span class='const'><span class='object_link'><a href="Ovto/Actions.html" title="Ovto::Actions (class)">Actions</a></span></span>
90
+ <span class='kw'>def</span> <span class='id identifier rubyid_set_celsius'>set_celsius</span><span class='lparen'>(</span><span class='label'>value:</span><span class='rparen'>)</span>
91
+ <span class='kw'>return</span> <span class='lbrace'>{</span><span class='label'>celsius:</span> <span class='id identifier rubyid_value'>value</span><span class='rbrace'>}</span>
92
+ <span class='kw'>end</span>
93
+
94
+ <span class='kw'>def</span> <span class='id identifier rubyid_set_fahrenheit'>set_fahrenheit</span><span class='lparen'>(</span><span class='label'>value:</span><span class='rparen'>)</span>
95
+ <span class='id identifier rubyid_new_celsius'>new_celsius</span> <span class='op'>=</span> <span class='lparen'>(</span><span class='id identifier rubyid_value'>value</span> <span class='op'>-</span> <span class='int'>32</span><span class='rparen'>)</span> <span class='op'>*</span> <span class='int'>5</span> <span class='op'>/</span> <span class='float'>9.0</span>
96
+ <span class='kw'>return</span> <span class='lbrace'>{</span><span class='label'>celsius:</span> <span class='id identifier rubyid_new_celsius'>new_celsius</span><span class='rbrace'>}</span>
97
+ <span class='kw'>end</span>
98
+ <span class='kw'>end</span>
99
+
100
+ <span class='kw'>class</span> <span class='const'>MainComponent</span> <span class='op'>&lt;</span> <span class='const'><span class='object_link'><a href="Ovto.html" title="Ovto (module)">Ovto</a></span></span><span class='op'>::</span><span class='const'><span class='object_link'><a href="Ovto/Component.html" title="Ovto::Component (class)">Component</a></span></span>
101
+ <span class='kw'>def</span> <span class='id identifier rubyid_render'>render</span>
102
+ <span class='id identifier rubyid_o'>o</span> <span class='tstring'><span class='tstring_beg'>&#39;</span><span class='tstring_content'>div</span><span class='tstring_end'>&#39;</span></span> <span class='kw'>do</span>
103
+ <span class='id identifier rubyid_o'>o</span> <span class='tstring'><span class='tstring_beg'>&#39;</span><span class='tstring_content'>span</span><span class='tstring_end'>&#39;</span></span><span class='comma'>,</span> <span class='tstring'><span class='tstring_beg'>&#39;</span><span class='tstring_content'>Celcius:</span><span class='tstring_end'>&#39;</span></span>
104
+ <span class='id identifier rubyid_o'>o</span> <span class='tstring'><span class='tstring_beg'>&#39;</span><span class='tstring_content'>input</span><span class='tstring_end'>&#39;</span></span><span class='comma'>,</span> <span class='lbrace'>{</span>
105
+ <span class='label'>type:</span> <span class='tstring'><span class='tstring_beg'>&#39;</span><span class='tstring_content'>text</span><span class='tstring_end'>&#39;</span></span><span class='comma'>,</span>
106
+ <span class='label'>onchange:</span> <span class='tlambda'>-&gt;</span><span class='lparen'>(</span><span class='id identifier rubyid_e'>e</span><span class='rparen'>)</span><span class='tlambeg'>{</span> <span class='id identifier rubyid_actions'>actions</span><span class='period'>.</span><span class='id identifier rubyid_set_celsius'>set_celsius</span><span class='lparen'>(</span><span class='label'>value:</span> <span class='id identifier rubyid_e'>e</span><span class='period'>.</span><span class='id identifier rubyid_target'>target</span><span class='period'>.</span><span class='id identifier rubyid_value'>value</span><span class='period'>.</span><span class='id identifier rubyid_to_i'>to_i</span><span class='rparen'>)</span> <span class='rbrace'>}</span><span class='comma'>,</span>
107
+ <span class='label'>value:</span> <span class='id identifier rubyid_state'>state</span><span class='period'>.</span><span class='id identifier rubyid_celsius'>celsius</span>
108
+ <span class='rbrace'>}</span>
109
+ <span class='id identifier rubyid_o'>o</span> <span class='tstring'><span class='tstring_beg'>&#39;</span><span class='tstring_content'>span</span><span class='tstring_end'>&#39;</span></span><span class='comma'>,</span> <span class='tstring'><span class='tstring_beg'>&#39;</span><span class='tstring_content'>Fahrenheit:</span><span class='tstring_end'>&#39;</span></span>
110
+ <span class='id identifier rubyid_o'>o</span> <span class='tstring'><span class='tstring_beg'>&#39;</span><span class='tstring_content'>input</span><span class='tstring_end'>&#39;</span></span><span class='comma'>,</span> <span class='lbrace'>{</span>
111
+ <span class='label'>type:</span> <span class='tstring'><span class='tstring_beg'>&#39;</span><span class='tstring_content'>text</span><span class='tstring_end'>&#39;</span></span><span class='comma'>,</span>
112
+ <span class='label'>onchange:</span> <span class='tlambda'>-&gt;</span><span class='lparen'>(</span><span class='id identifier rubyid_e'>e</span><span class='rparen'>)</span><span class='tlambeg'>{</span> <span class='id identifier rubyid_actions'>actions</span><span class='period'>.</span><span class='id identifier rubyid_set_fahrenheit'>set_fahrenheit</span><span class='lparen'>(</span><span class='label'>value:</span> <span class='id identifier rubyid_e'>e</span><span class='period'>.</span><span class='id identifier rubyid_target'>target</span><span class='period'>.</span><span class='id identifier rubyid_value'>value</span><span class='period'>.</span><span class='id identifier rubyid_to_i'>to_i</span><span class='rparen'>)</span> <span class='rbrace'>}</span><span class='comma'>,</span>
113
+ <span class='label'>value:</span> <span class='id identifier rubyid_state'>state</span><span class='period'>.</span><span class='id identifier rubyid_fahrenheit'>fahrenheit</span>
114
+ <span class='rbrace'>}</span>
115
+ <span class='kw'>end</span>
116
+ <span class='kw'>end</span>
117
+ <span class='kw'>end</span>
118
+ <span class='kw'>end</span>
119
+
120
+ <span class='const'>MyApp</span><span class='period'>.</span><span class='id identifier rubyid_run'>run</span><span class='lparen'>(</span><span class='label'>id:</span> <span class='tstring'><span class='tstring_beg'>&#39;</span><span class='tstring_content'>ovto</span><span class='tstring_end'>&#39;</span></span><span class='rparen'>)</span>
120
121
  </code></pre>
121
122
 
122
123
  <p>See the <a href="https://yhara.github.io/ovto/docs/guides/tutorial.html">book</a> for details.</p>
123
124
 
124
- <h2>Setup</h2>
125
+ <h2 id="label-Setup">Setup</h2>
125
126
 
126
- <h3>Static</h3>
127
+ <h3 id="label-Static">Static</h3>
127
128
 
128
- <p><a href="./examples/static">./examples/static</a> demonstrates how to convert Ovto app
129
- into a .js file.</p>
129
+ <p><a href="./examples/static">./examples/static</a> demonstrates how to convert Ovto app into a .js file.</p>
130
130
 
131
- <h3>Ovto + Sinatra</h3>
131
+ <h3 id="label-Ovto+-2B+Sinatra">Ovto + Sinatra</h3>
132
132
 
133
- <p><a href="./examples/sinatra">./examples/sinatra</a> demonstrates how to serve Ovto app
134
- from Sinatra.</p>
133
+ <p><a href="./examples/sinatra">./examples/sinatra</a> demonstrates how to serve Ovto app from Sinatra.</p>
135
134
 
136
- <h3>Ovto + Rails</h3>
135
+ <h3 id="label-Ovto+-2B+Rails">Ovto + Rails</h3>
137
136
 
138
137
  <p><a href="https://github.com/yhara/vision">yhara/vision</a> is a working example of using Ovto with Rails 5.</p>
139
138
 
140
- <h2>Acknowledgements</h2>
139
+ <h2 id="label-Acknowledgements">Acknowledgements</h2>
140
+ <ul><li>
141
+ <p><a href="https://github.com/hyperapp/hyperapp">hyperapp</a></p>
142
+ </li></ul>
141
143
 
142
- <ul>
143
- <li><a href="https://github.com/hyperapp/hyperapp">hyperapp</a></li>
144
- </ul>
144
+ <h2 id="label-Contact">Contact</h2>
145
145
 
146
- <h2>Contact</h2>
147
-
148
- <p><a href="https://github.com/yhara/ovto/issues">https://github.com/yhara/ovto/issues</a></p>
146
+ <p><a href="https://github.com/yhara/ovto/issues">github.com/yhara/ovto/issues</a></p>
149
147
  </div></div>
150
148
 
151
149
  <div id="footer">
152
- Generated on Thu Aug 8 01:14:40 2019 by
150
+ Generated on Fri Oct 22 08:18:17 2021 by
153
151
  <a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
154
- 0.9.19 (ruby-2.5.5).
152
+ 0.9.26 (ruby-3.0.2).
155
153
  </div>
156
154
 
157
155
  </div>
@@ -4,9 +4,9 @@
4
4
  <meta name="viewport" content="width=device-width, initial-scale=1.0">
5
5
  <meta charset="utf-8" />
6
6
 
7
- <link rel="stylesheet" href="css/full_list.css" type="text/css" media="screen" charset="utf-8" />
7
+ <link rel="stylesheet" href="css/full_list.css" type="text/css" media="screen" />
8
8
 
9
- <link rel="stylesheet" href="css/common.css" type="text/css" media="screen" charset="utf-8" />
9
+ <link rel="stylesheet" href="css/common.css" type="text/css" media="screen" />
10
10
 
11
11
 
12
12
 
data/docs/api/frames.html CHANGED
@@ -2,9 +2,9 @@
2
2
  <html>
3
3
  <head>
4
4
  <meta charset="utf-8">
5
- <title>Documentation by YARD 0.9.19</title>
5
+ <title>Documentation by YARD 0.9.26</title>
6
6
  </head>
7
- <script type="text/javascript" charset="utf-8">
7
+ <script type="text/javascript">
8
8
  var match = unescape(window.location.hash).match(/^#!(.+)/);
9
9
  var name = match ? match[1] : 'index.html';
10
10
  name = name.replace(/^(\w+):\/\//, '').replace(/^\/\//, '');
data/docs/api/index.html CHANGED
@@ -6,15 +6,15 @@
6
6
  <title>
7
7
  File: README
8
8
 
9
- &mdash; Documentation by YARD 0.9.19
9
+ &mdash; Documentation by YARD 0.9.26
10
10
 
11
11
  </title>
12
12
 
13
- <link rel="stylesheet" href="css/style.css" type="text/css" charset="utf-8" />
13
+ <link rel="stylesheet" href="css/style.css" type="text/css" />
14
14
 
15
- <link rel="stylesheet" href="css/common.css" type="text/css" charset="utf-8" />
15
+ <link rel="stylesheet" href="css/common.css" type="text/css" />
16
16
 
17
- <script type="text/javascript" charset="utf-8">
17
+ <script type="text/javascript">
18
18
  pathId = "README";
19
19
  relpath = '';
20
20
  </script>
@@ -57,101 +57,99 @@
57
57
  <div class="clear"></div>
58
58
  </div>
59
59
 
60
- <div id="content"><div id='filecontents'><h1>Ovto</h1>
60
+ <div id="content"><div id='filecontents'>
61
+ <h1 id="label-Ovto">Ovto</h1>
61
62
 
62
63
  <p>Client-side web framework for Opal</p>
63
64
 
64
- <p><img src="ovtologo.png" alt="logo"></p>
65
-
66
- <h2>Documents</h2>
67
-
68
- <ul>
69
- <li><a href="https://yhara.github.io/ovto/docs/">Book</a></li>
70
- <li><a href="https://yhara.github.io/ovto/api/">yardoc</a></li>
71
- </ul>
72
-
73
- <h2>Example</h2>
74
-
75
- <p><img src="screenshot.png" alt="screenshot"></p>
76
-
77
- <pre class="code rb"><code class="rb">require &#39;ovto&#39;
78
-
79
- class MyApp &lt; Ovto::App
80
- class State &lt; Ovto::State
81
- item :celsius, default: 0
82
-
83
- def fahrenheit
84
- (celsius * 9 / 5.0) + 32
85
- end
86
- end
87
-
88
- class Actions &lt; Ovto::Actions
89
- def set_celsius(value:)
90
- return {celsius: value}
91
- end
92
-
93
- def set_fahrenheit(value:)
94
- new_celsius = (value - 32) * 5 / 9.0
95
- return {celsius: new_celsius}
96
- end
97
- end
98
-
99
- class MainComponent &lt; Ovto::Component
100
- def render
101
- o &#39;div&#39; do
102
- o &#39;span&#39;, &#39;Celcius:&#39;
103
- o &#39;input&#39;, {
104
- type: &#39;text&#39;,
105
- onchange: -&gt;(e){ actions.set_celsius(value: e.target.value.to_i) },
106
- value: state.celsius
107
- }
108
- o &#39;span&#39;, &#39;Fahrenheit:&#39;
109
- o &#39;input&#39;, {
110
- type: &#39;text&#39;,
111
- onchange: -&gt;(e){ actions.set_fahrenheit(value: e.target.value.to_i) },
112
- value: state.fahrenheit
113
- }
114
- end
115
- end
116
- end
117
- end
118
-
119
- MyApp.run(id: &#39;ovto&#39;)
65
+ <p><img src="ovtologo.png"></p>
66
+
67
+ <h2 id="label-Documents">Documents</h2>
68
+ <ul><li>
69
+ <p><a href="https://yhara.github.io/ovto/docs/">Book</a></p>
70
+ </li><li>
71
+ <p><a href="https://yhara.github.io/ovto/api/">yardoc</a></p>
72
+ </li></ul>
73
+
74
+ <h2 id="label-Example">Example</h2>
75
+
76
+ <p><img src="screenshot.png"></p>
77
+
78
+ <pre class="code ruby"><code class="ruby"><span class='id identifier rubyid_require'>require</span> <span class='tstring'><span class='tstring_beg'>&#39;</span><span class='tstring_content'>ovto</span><span class='tstring_end'>&#39;</span></span>
79
+
80
+ <span class='kw'>class</span> <span class='const'>MyApp</span> <span class='op'>&lt;</span> <span class='const'><span class='object_link'><a href="Ovto.html" title="Ovto (module)">Ovto</a></span></span><span class='op'>::</span><span class='const'><span class='object_link'><a href="Ovto/App.html" title="Ovto::App (class)">App</a></span></span>
81
+ <span class='kw'>class</span> <span class='const'>State</span> <span class='op'>&lt;</span> <span class='const'><span class='object_link'><a href="Ovto.html" title="Ovto (module)">Ovto</a></span></span><span class='op'>::</span><span class='const'><span class='object_link'><a href="Ovto/State.html" title="Ovto::State (class)">State</a></span></span>
82
+ <span class='id identifier rubyid_item'>item</span> <span class='symbol'>:celsius</span><span class='comma'>,</span> <span class='label'>default:</span> <span class='int'>0</span>
83
+
84
+ <span class='kw'>def</span> <span class='id identifier rubyid_fahrenheit'>fahrenheit</span>
85
+ <span class='lparen'>(</span><span class='id identifier rubyid_celsius'>celsius</span> <span class='op'>*</span> <span class='int'>9</span> <span class='op'>/</span> <span class='float'>5.0</span><span class='rparen'>)</span> <span class='op'>+</span> <span class='int'>32</span>
86
+ <span class='kw'>end</span>
87
+ <span class='kw'>end</span>
88
+
89
+ <span class='kw'>class</span> <span class='const'>Actions</span> <span class='op'>&lt;</span> <span class='const'><span class='object_link'><a href="Ovto.html" title="Ovto (module)">Ovto</a></span></span><span class='op'>::</span><span class='const'><span class='object_link'><a href="Ovto/Actions.html" title="Ovto::Actions (class)">Actions</a></span></span>
90
+ <span class='kw'>def</span> <span class='id identifier rubyid_set_celsius'>set_celsius</span><span class='lparen'>(</span><span class='label'>value:</span><span class='rparen'>)</span>
91
+ <span class='kw'>return</span> <span class='lbrace'>{</span><span class='label'>celsius:</span> <span class='id identifier rubyid_value'>value</span><span class='rbrace'>}</span>
92
+ <span class='kw'>end</span>
93
+
94
+ <span class='kw'>def</span> <span class='id identifier rubyid_set_fahrenheit'>set_fahrenheit</span><span class='lparen'>(</span><span class='label'>value:</span><span class='rparen'>)</span>
95
+ <span class='id identifier rubyid_new_celsius'>new_celsius</span> <span class='op'>=</span> <span class='lparen'>(</span><span class='id identifier rubyid_value'>value</span> <span class='op'>-</span> <span class='int'>32</span><span class='rparen'>)</span> <span class='op'>*</span> <span class='int'>5</span> <span class='op'>/</span> <span class='float'>9.0</span>
96
+ <span class='kw'>return</span> <span class='lbrace'>{</span><span class='label'>celsius:</span> <span class='id identifier rubyid_new_celsius'>new_celsius</span><span class='rbrace'>}</span>
97
+ <span class='kw'>end</span>
98
+ <span class='kw'>end</span>
99
+
100
+ <span class='kw'>class</span> <span class='const'>MainComponent</span> <span class='op'>&lt;</span> <span class='const'><span class='object_link'><a href="Ovto.html" title="Ovto (module)">Ovto</a></span></span><span class='op'>::</span><span class='const'><span class='object_link'><a href="Ovto/Component.html" title="Ovto::Component (class)">Component</a></span></span>
101
+ <span class='kw'>def</span> <span class='id identifier rubyid_render'>render</span>
102
+ <span class='id identifier rubyid_o'>o</span> <span class='tstring'><span class='tstring_beg'>&#39;</span><span class='tstring_content'>div</span><span class='tstring_end'>&#39;</span></span> <span class='kw'>do</span>
103
+ <span class='id identifier rubyid_o'>o</span> <span class='tstring'><span class='tstring_beg'>&#39;</span><span class='tstring_content'>span</span><span class='tstring_end'>&#39;</span></span><span class='comma'>,</span> <span class='tstring'><span class='tstring_beg'>&#39;</span><span class='tstring_content'>Celcius:</span><span class='tstring_end'>&#39;</span></span>
104
+ <span class='id identifier rubyid_o'>o</span> <span class='tstring'><span class='tstring_beg'>&#39;</span><span class='tstring_content'>input</span><span class='tstring_end'>&#39;</span></span><span class='comma'>,</span> <span class='lbrace'>{</span>
105
+ <span class='label'>type:</span> <span class='tstring'><span class='tstring_beg'>&#39;</span><span class='tstring_content'>text</span><span class='tstring_end'>&#39;</span></span><span class='comma'>,</span>
106
+ <span class='label'>onchange:</span> <span class='tlambda'>-&gt;</span><span class='lparen'>(</span><span class='id identifier rubyid_e'>e</span><span class='rparen'>)</span><span class='tlambeg'>{</span> <span class='id identifier rubyid_actions'>actions</span><span class='period'>.</span><span class='id identifier rubyid_set_celsius'>set_celsius</span><span class='lparen'>(</span><span class='label'>value:</span> <span class='id identifier rubyid_e'>e</span><span class='period'>.</span><span class='id identifier rubyid_target'>target</span><span class='period'>.</span><span class='id identifier rubyid_value'>value</span><span class='period'>.</span><span class='id identifier rubyid_to_i'>to_i</span><span class='rparen'>)</span> <span class='rbrace'>}</span><span class='comma'>,</span>
107
+ <span class='label'>value:</span> <span class='id identifier rubyid_state'>state</span><span class='period'>.</span><span class='id identifier rubyid_celsius'>celsius</span>
108
+ <span class='rbrace'>}</span>
109
+ <span class='id identifier rubyid_o'>o</span> <span class='tstring'><span class='tstring_beg'>&#39;</span><span class='tstring_content'>span</span><span class='tstring_end'>&#39;</span></span><span class='comma'>,</span> <span class='tstring'><span class='tstring_beg'>&#39;</span><span class='tstring_content'>Fahrenheit:</span><span class='tstring_end'>&#39;</span></span>
110
+ <span class='id identifier rubyid_o'>o</span> <span class='tstring'><span class='tstring_beg'>&#39;</span><span class='tstring_content'>input</span><span class='tstring_end'>&#39;</span></span><span class='comma'>,</span> <span class='lbrace'>{</span>
111
+ <span class='label'>type:</span> <span class='tstring'><span class='tstring_beg'>&#39;</span><span class='tstring_content'>text</span><span class='tstring_end'>&#39;</span></span><span class='comma'>,</span>
112
+ <span class='label'>onchange:</span> <span class='tlambda'>-&gt;</span><span class='lparen'>(</span><span class='id identifier rubyid_e'>e</span><span class='rparen'>)</span><span class='tlambeg'>{</span> <span class='id identifier rubyid_actions'>actions</span><span class='period'>.</span><span class='id identifier rubyid_set_fahrenheit'>set_fahrenheit</span><span class='lparen'>(</span><span class='label'>value:</span> <span class='id identifier rubyid_e'>e</span><span class='period'>.</span><span class='id identifier rubyid_target'>target</span><span class='period'>.</span><span class='id identifier rubyid_value'>value</span><span class='period'>.</span><span class='id identifier rubyid_to_i'>to_i</span><span class='rparen'>)</span> <span class='rbrace'>}</span><span class='comma'>,</span>
113
+ <span class='label'>value:</span> <span class='id identifier rubyid_state'>state</span><span class='period'>.</span><span class='id identifier rubyid_fahrenheit'>fahrenheit</span>
114
+ <span class='rbrace'>}</span>
115
+ <span class='kw'>end</span>
116
+ <span class='kw'>end</span>
117
+ <span class='kw'>end</span>
118
+ <span class='kw'>end</span>
119
+
120
+ <span class='const'>MyApp</span><span class='period'>.</span><span class='id identifier rubyid_run'>run</span><span class='lparen'>(</span><span class='label'>id:</span> <span class='tstring'><span class='tstring_beg'>&#39;</span><span class='tstring_content'>ovto</span><span class='tstring_end'>&#39;</span></span><span class='rparen'>)</span>
120
121
  </code></pre>
121
122
 
122
123
  <p>See the <a href="https://yhara.github.io/ovto/docs/guides/tutorial.html">book</a> for details.</p>
123
124
 
124
- <h2>Setup</h2>
125
+ <h2 id="label-Setup">Setup</h2>
125
126
 
126
- <h3>Static</h3>
127
+ <h3 id="label-Static">Static</h3>
127
128
 
128
- <p><a href="./examples/static">./examples/static</a> demonstrates how to convert Ovto app
129
- into a .js file.</p>
129
+ <p><a href="./examples/static">./examples/static</a> demonstrates how to convert Ovto app into a .js file.</p>
130
130
 
131
- <h3>Ovto + Sinatra</h3>
131
+ <h3 id="label-Ovto+-2B+Sinatra">Ovto + Sinatra</h3>
132
132
 
133
- <p><a href="./examples/sinatra">./examples/sinatra</a> demonstrates how to serve Ovto app
134
- from Sinatra.</p>
133
+ <p><a href="./examples/sinatra">./examples/sinatra</a> demonstrates how to serve Ovto app from Sinatra.</p>
135
134
 
136
- <h3>Ovto + Rails</h3>
135
+ <h3 id="label-Ovto+-2B+Rails">Ovto + Rails</h3>
137
136
 
138
137
  <p><a href="https://github.com/yhara/vision">yhara/vision</a> is a working example of using Ovto with Rails 5.</p>
139
138
 
140
- <h2>Acknowledgements</h2>
139
+ <h2 id="label-Acknowledgements">Acknowledgements</h2>
140
+ <ul><li>
141
+ <p><a href="https://github.com/hyperapp/hyperapp">hyperapp</a></p>
142
+ </li></ul>
141
143
 
142
- <ul>
143
- <li><a href="https://github.com/hyperapp/hyperapp">hyperapp</a></li>
144
- </ul>
144
+ <h2 id="label-Contact">Contact</h2>
145
145
 
146
- <h2>Contact</h2>
147
-
148
- <p><a href="https://github.com/yhara/ovto/issues">https://github.com/yhara/ovto/issues</a></p>
146
+ <p><a href="https://github.com/yhara/ovto/issues">github.com/yhara/ovto/issues</a></p>
149
147
  </div></div>
150
148
 
151
149
  <div id="footer">
152
- Generated on Thu Aug 8 01:14:40 2019 by
150
+ Generated on Fri Oct 22 08:18:17 2021 by
153
151
  <a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
154
- 0.9.19 (ruby-2.5.5).
152
+ 0.9.26 (ruby-3.0.2).
155
153
  </div>
156
154
 
157
155
  </div>
data/docs/api/js/app.js CHANGED
@@ -171,6 +171,7 @@ function generateTOC() {
171
171
  var counter = 0;
172
172
  var tags = ['h2', 'h3', 'h4', 'h5', 'h6'];
173
173
  var i;
174
+ var curli;
174
175
  if ($('#filecontents h1').length > 1) tags.unshift('h1');
175
176
  for (i = 0; i < tags.length; i++) { tags[i] = '#filecontents ' + tags[i]; }
176
177
  var lastTag = parseInt(tags[0][1], 10);
@@ -190,15 +191,25 @@ function generateTOC() {
190
191
  }
191
192
  if (thisTag > lastTag) {
192
193
  for (i = 0; i < thisTag - lastTag; i++) {
193
- var tmp = $('<ol/>'); toc.append(tmp); toc = tmp;
194
+ if ( typeof(curli) == "undefined" ) {
195
+ curli = $('<li/>');
196
+ toc.append(curli);
197
+ }
198
+ toc = $('<ol/>');
199
+ curli.append(toc);
200
+ curli = undefined;
194
201
  }
195
202
  }
196
203
  if (thisTag < lastTag) {
197
- for (i = 0; i < lastTag - thisTag; i++) toc = toc.parent();
204
+ for (i = 0; i < lastTag - thisTag; i++) {
205
+ toc = toc.parent();
206
+ toc = toc.parent();
207
+ }
198
208
  }
199
209
  var title = $(this).attr('toc-title');
200
210
  if (typeof(title) == "undefined") title = $(this).text();
201
- toc.append('<li><a href="#' + this.id + '">' + title + '</a></li>');
211
+ curli =$('<li><a href="#' + this.id + '">' + title + '</a></li>');
212
+ toc.append(curli);
202
213
  lastTag = thisTag;
203
214
  });
204
215
  if (!show) return;