porolog 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.
data/doc/Porolog.html ADDED
@@ -0,0 +1,337 @@
1
+ <!DOCTYPE html>
2
+ <html>
3
+ <head>
4
+ <meta charset="utf-8">
5
+ <meta name="viewport" content="width=device-width, initial-scale=1.0">
6
+ <title>
7
+ Module: Porolog
8
+
9
+ &mdash; Documentation by YARD 0.9.19
10
+
11
+ </title>
12
+
13
+ <link rel="stylesheet" href="css/style.css" type="text/css" charset="utf-8" />
14
+
15
+ <link rel="stylesheet" href="css/common.css" type="text/css" charset="utf-8" />
16
+
17
+ <script type="text/javascript" charset="utf-8">
18
+ pathId = "Porolog";
19
+ relpath = '';
20
+ </script>
21
+
22
+
23
+ <script type="text/javascript" charset="utf-8" src="js/jquery.js"></script>
24
+
25
+ <script type="text/javascript" charset="utf-8" src="js/app.js"></script>
26
+
27
+
28
+ </head>
29
+ <body>
30
+ <div class="nav_wrap">
31
+ <iframe id="nav" src="class_list.html?1"></iframe>
32
+ <div id="resizer"></div>
33
+ </div>
34
+
35
+ <div id="main" tabindex="-1">
36
+ <div id="header">
37
+ <div id="menu">
38
+
39
+ <a href="_index.html">Index (P)</a> &raquo;
40
+
41
+
42
+ <span class="title">Porolog</span>
43
+
44
+ </div>
45
+
46
+ <div id="search">
47
+
48
+ <a class="full_list_link" id="class_list_link"
49
+ href="class_list.html">
50
+
51
+ <svg width="24" height="24">
52
+ <rect x="0" y="4" width="24" height="4" rx="1" ry="1"></rect>
53
+ <rect x="0" y="12" width="24" height="4" rx="1" ry="1"></rect>
54
+ <rect x="0" y="20" width="24" height="4" rx="1" ry="1"></rect>
55
+ </svg>
56
+ </a>
57
+
58
+ </div>
59
+ <div class="clear"></div>
60
+ </div>
61
+
62
+ <div id="content"><h1>Module: Porolog
63
+
64
+
65
+
66
+ </h1>
67
+ <div class="box_info">
68
+
69
+
70
+
71
+
72
+
73
+
74
+
75
+
76
+
77
+
78
+
79
+ <dl>
80
+ <dt>Defined in:</dt>
81
+ <dd>lib/porolog.rb<span class="defines">,<br />
82
+ lib/porolog/error.rb,<br /> lib/porolog/scope.rb,<br /> lib/porolog/arguments.rb,<br /> lib/porolog/predicate.rb</span>
83
+ </dd>
84
+ </dl>
85
+
86
+ </div>
87
+
88
+ <h2>Overview</h2><div class="docstring">
89
+ <div class="discussion">
90
+
91
+ <p>lib/porolog/predicate.rb - Plain Old Ruby Objects Prolog Engine –
92
+ Predicate</p>
93
+
94
+ <pre class="code ruby"><code class="ruby">Luis Esteban 2 May 2018
95
+ created</code></pre>
96
+
97
+
98
+ </div>
99
+ </div>
100
+ <div class="tags">
101
+
102
+
103
+ </div><h2>Defined Under Namespace</h2>
104
+ <p class="children">
105
+
106
+
107
+
108
+
109
+ <strong class="classes">Classes:</strong> <span class='object_link'><a href="Porolog/Arguments.html" title="Porolog::Arguments (class)">Arguments</a></span>, <span class='object_link'><a href="Porolog/PorologError.html" title="Porolog::PorologError (class)">PorologError</a></span>, <span class='object_link'><a href="Porolog/Predicate.html" title="Porolog::Predicate (class)">Predicate</a></span>, <span class='object_link'><a href="Porolog/Scope.html" title="Porolog::Scope (class)">Scope</a></span>
110
+
111
+
112
+ </p>
113
+
114
+
115
+ <h2>
116
+ Constant Summary
117
+ <small><a href="#" class="constants_summary_toggle">collapse</a></small>
118
+ </h2>
119
+
120
+ <dl class="constants">
121
+
122
+ <dt id="VERSION-constant" class="">VERSION =
123
+ <div class="docstring">
124
+ <div class="discussion">
125
+
126
+ <p>The most recent version of the Porolog gem.</p>
127
+
128
+
129
+ </div>
130
+ </div>
131
+ <div class="tags">
132
+
133
+
134
+ </div>
135
+ </dt>
136
+ <dd><pre class="code"><span class='tstring'><span class='tstring_beg'>&#39;</span><span class='tstring_content'>0.0.4</span><span class='tstring_end'>&#39;</span></span></pre></dd>
137
+
138
+ <dt id="VERSION_DATE-constant" class="">VERSION_DATE =
139
+ <div class="docstring">
140
+ <div class="discussion">
141
+
142
+ <p>The most recent date of when the VERSION changed.</p>
143
+
144
+
145
+ </div>
146
+ </div>
147
+ <div class="tags">
148
+
149
+
150
+ </div>
151
+ </dt>
152
+ <dd><pre class="code"><span class='tstring'><span class='tstring_beg'>&#39;</span><span class='tstring_content'>2019-04-21</span><span class='tstring_end'>&#39;</span></span></pre></dd>
153
+
154
+ </dl>
155
+
156
+
157
+
158
+
159
+
160
+
161
+
162
+
163
+
164
+ <h2>
165
+ Instance Method Summary
166
+ <small><a href="#" class="summary_toggle">collapse</a></small>
167
+ </h2>
168
+
169
+ <ul class="summary">
170
+
171
+ <li class="public ">
172
+ <span class="summary_signature">
173
+
174
+ <a href="#predicate-instance_method" title="#predicate (instance method)">#<strong>predicate</strong>(*names) &#x21d2; Porolog::Predicate<sup>+</sup> </a>
175
+
176
+
177
+
178
+ </span>
179
+
180
+
181
+
182
+
183
+
184
+
185
+
186
+
187
+
188
+ <span class="summary_desc"><div class='inline'>
189
+ <p>A convenience method to create a Predicate, along with a method that
190
+ returns an Arguments based on the arguments provided to the method.</p>
191
+ </div></span>
192
+
193
+ </li>
194
+
195
+
196
+ </ul>
197
+
198
+
199
+
200
+
201
+ <div id="instance_method_details" class="method_details_list">
202
+ <h2>Instance Method Details</h2>
203
+
204
+
205
+ <div class="method_details first">
206
+ <h3 class="signature first" id="predicate-instance_method">
207
+
208
+ #<strong>predicate</strong>(*names) &#x21d2; <tt><span class='object_link'><a href="Porolog/Predicate.html" title="Porolog::Predicate (class)">Porolog::Predicate</a></span></tt><sup>+</sup>
209
+
210
+
211
+
212
+
213
+
214
+ </h3><div class="docstring">
215
+ <div class="discussion">
216
+
217
+ <p>A convenience method to create a Predicate, along with a method that
218
+ returns an Arguments based on the arguments provided to the method.</p>
219
+
220
+
221
+ </div>
222
+ </div>
223
+ <div class="tags">
224
+ <p class="tag_title">Parameters:</p>
225
+ <ul class="param">
226
+
227
+ <li>
228
+
229
+ <span class='name'>names</span>
230
+
231
+
232
+ <span class='type'>(<tt>Array&lt;#to_sym&gt;</tt>)</span>
233
+
234
+
235
+
236
+ &mdash;
237
+ <div class='inline'>
238
+ <p>names of the Predicates to create.</p>
239
+ </div>
240
+
241
+ </li>
242
+
243
+ </ul>
244
+
245
+ <p class="tag_title">Returns:</p>
246
+ <ul class="return">
247
+
248
+ <li>
249
+
250
+
251
+ <span class='type'>(<tt><span class='object_link'><a href="Porolog/Predicate.html" title="Porolog::Predicate (class)">Porolog::Predicate</a></span></tt>)</span>
252
+
253
+
254
+
255
+ &mdash;
256
+ <div class='inline'>
257
+ <p>Predicate created if only one name is provided</p>
258
+ </div>
259
+
260
+ </li>
261
+
262
+ <li>
263
+
264
+
265
+ <span class='type'>(<tt>Array&lt;<span class='object_link'><a href="Porolog/Predicate.html" title="Porolog::Predicate (class)">Porolog::Predicate</a></span>&gt;</tt>)</span>
266
+
267
+
268
+
269
+ &mdash;
270
+ <div class='inline'>
271
+ <p>Predicates created if multiple names are provided</p>
272
+ </div>
273
+
274
+ </li>
275
+
276
+ </ul>
277
+
278
+ </div><table class="source_code">
279
+ <tr>
280
+ <td>
281
+ <pre class="lines">
282
+
283
+
284
+ 21
285
+ 22
286
+ 23
287
+ 24
288
+ 25
289
+ 26
290
+ 27
291
+ 28
292
+ 29
293
+ 30
294
+ 31
295
+ 32
296
+ 33
297
+ 34
298
+ 35
299
+ 36</pre>
300
+ </td>
301
+ <td>
302
+ <pre class="code"><span class="info file"># File 'lib/porolog.rb', line 21</span>
303
+
304
+ <span class='kw'>def</span> <span class='id identifier rubyid_predicate'>predicate</span><span class='lparen'>(</span><span class='op'>*</span><span class='id identifier rubyid_names'>names</span><span class='rparen'>)</span>
305
+ <span class='id identifier rubyid_names'>names</span> <span class='op'>=</span> <span class='lbracket'>[</span><span class='id identifier rubyid_names'>names</span><span class='rbracket'>]</span><span class='period'>.</span><span class='id identifier rubyid_flatten'>flatten</span>
306
+
307
+ <span class='id identifier rubyid_predicates'>predicates</span> <span class='op'>=</span> <span class='id identifier rubyid_names'>names</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='op'>|</span>
308
+ <span class='id identifier rubyid_method'>method</span> <span class='op'>=</span> <span class='id identifier rubyid_name'>name</span><span class='period'>.</span><span class='id identifier rubyid_to_sym'>to_sym</span>
309
+ <span class='id identifier rubyid_predicate'>predicate</span> <span class='op'>=</span> <span class='const'><span class='object_link'><a href="Porolog/Predicate.html" title="Porolog::Predicate (class)">Predicate</a></span></span><span class='period'>.</span><span class='id identifier rubyid_new'><span class='object_link'><a href="Porolog/Predicate.html#new-class_method" title="Porolog::Predicate.new (method)">new</a></span></span><span class='lparen'>(</span><span class='id identifier rubyid_name'>name</span><span class='rparen'>)</span>
310
+ <span class='const'>Object</span><span class='period'>.</span><span class='id identifier rubyid_class_eval'>class_eval</span><span class='lbrace'>{</span>
311
+ <span class='id identifier rubyid_define_method'>define_method</span><span class='lparen'>(</span><span class='id identifier rubyid_method'>method</span><span class='rparen'>)</span><span class='lbrace'>{</span><span class='op'>|</span><span class='op'>*</span><span class='id identifier rubyid_args'>args</span><span class='op'>|</span>
312
+ <span class='id identifier rubyid_predicate'>predicate</span><span class='period'>.</span><span class='lparen'>(</span><span class='op'>*</span><span class='id identifier rubyid_args'>args</span><span class='rparen'>)</span>
313
+ <span class='rbrace'>}</span>
314
+ <span class='rbrace'>}</span>
315
+ <span class='id identifier rubyid_predicate'>predicate</span>
316
+ <span class='rbrace'>}</span>
317
+
318
+ <span class='id identifier rubyid_predicates'>predicates</span><span class='period'>.</span><span class='id identifier rubyid_size'>size</span> <span class='op'>&gt;</span> <span class='int'>1</span> <span class='op'>&amp;&amp;</span> <span class='id identifier rubyid_predicates'>predicates</span> <span class='op'>||</span> <span class='id identifier rubyid_predicates'>predicates</span><span class='period'>.</span><span class='id identifier rubyid_first'>first</span>
319
+ <span class='kw'>end</span></pre>
320
+ </td>
321
+ </tr>
322
+ </table>
323
+ </div>
324
+
325
+ </div>
326
+
327
+ </div>
328
+
329
+ <div id="footer">
330
+ Generated on Mon Apr 22 16:27:39 2019 by
331
+ <a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
332
+ 0.9.19 (ruby-2.3.4).
333
+ </div>
334
+
335
+ </div>
336
+ </body>
337
+ </html>
data/doc/_index.html ADDED
@@ -0,0 +1,187 @@
1
+ <!DOCTYPE html>
2
+ <html>
3
+ <head>
4
+ <meta charset="utf-8">
5
+ <meta name="viewport" content="width=device-width, initial-scale=1.0">
6
+ <title>
7
+ Documentation by YARD 0.9.19
8
+
9
+ </title>
10
+
11
+ <link rel="stylesheet" href="css/style.css" type="text/css" charset="utf-8" />
12
+
13
+ <link rel="stylesheet" href="css/common.css" type="text/css" charset="utf-8" />
14
+
15
+ <script type="text/javascript" charset="utf-8">
16
+ pathId = null;
17
+ relpath = '';
18
+ </script>
19
+
20
+
21
+ <script type="text/javascript" charset="utf-8" src="js/jquery.js"></script>
22
+
23
+ <script type="text/javascript" charset="utf-8" src="js/app.js"></script>
24
+
25
+
26
+ </head>
27
+ <body>
28
+ <div class="nav_wrap">
29
+ <iframe id="nav" src="class_list.html?1"></iframe>
30
+ <div id="resizer"></div>
31
+ </div>
32
+
33
+ <div id="main" tabindex="-1">
34
+ <div id="header">
35
+ <div id="menu">
36
+
37
+ </div>
38
+
39
+ <div id="search">
40
+
41
+ <a class="full_list_link" id="class_list_link"
42
+ href="class_list.html">
43
+
44
+ <svg width="24" height="24">
45
+ <rect x="0" y="4" width="24" height="4" rx="1" ry="1"></rect>
46
+ <rect x="0" y="12" width="24" height="4" rx="1" ry="1"></rect>
47
+ <rect x="0" y="20" width="24" height="4" rx="1" ry="1"></rect>
48
+ </svg>
49
+ </a>
50
+
51
+ </div>
52
+ <div class="clear"></div>
53
+ </div>
54
+
55
+ <div id="content"><h1 class="noborder title">Documentation by YARD 0.9.19</h1>
56
+ <div id="listing">
57
+ <h1 class="alphaindex">Alphabetic Index</h1>
58
+
59
+ <h2>File Listing</h2>
60
+ <ul id="files" class="index_inline_list">
61
+
62
+
63
+ <li class="r1"><a href="index.html" title="README">README</a></li>
64
+
65
+
66
+ </ul>
67
+
68
+ <div class="clear"></div>
69
+ <h2>Namespace Listing A-Z</h2>
70
+
71
+
72
+
73
+
74
+ <table>
75
+ <tr>
76
+ <td valign='top' width="33%">
77
+
78
+
79
+ <ul id="alpha_A" class="alpha">
80
+ <li class="letter">A</li>
81
+ <ul>
82
+
83
+ <li>
84
+ <span class='object_link'><a href="Porolog/Arguments.html" title="Porolog::Arguments (class)">Arguments</a></span>
85
+
86
+ <small>(Porolog)</small>
87
+
88
+ </li>
89
+
90
+ </ul>
91
+ </ul>
92
+
93
+
94
+ <ul id="alpha_N" class="alpha">
95
+ <li class="letter">N</li>
96
+ <ul>
97
+
98
+ <li>
99
+ <span class='object_link'><a href="Porolog/Predicate/NameError.html" title="Porolog::Predicate::NameError (class)">NameError</a></span>
100
+
101
+ <small>(Porolog::Predicate)</small>
102
+
103
+ </li>
104
+
105
+ <li>
106
+ <span class='object_link'><a href="Porolog/Scope/NotPredicateError.html" title="Porolog::Scope::NotPredicateError (class)">NotPredicateError</a></span>
107
+
108
+ <small>(Porolog::Scope)</small>
109
+
110
+ </li>
111
+
112
+ </ul>
113
+ </ul>
114
+
115
+
116
+ <ul id="alpha_P" class="alpha">
117
+ <li class="letter">P</li>
118
+ <ul>
119
+
120
+ <li>
121
+ <span class='object_link'><a href="Porolog.html" title="Porolog (module)">Porolog</a></span>
122
+
123
+ </li>
124
+
125
+ <li>
126
+ <span class='object_link'><a href="Porolog/PorologError.html" title="Porolog::PorologError (class)">PorologError</a></span>
127
+
128
+ <small>(Porolog)</small>
129
+
130
+ </li>
131
+
132
+ <li>
133
+ <span class='object_link'><a href="Porolog/Predicate.html" title="Porolog::Predicate (class)">Predicate</a></span>
134
+
135
+ <small>(Porolog)</small>
136
+
137
+ </li>
138
+
139
+ <li>
140
+ <span class='object_link'><a href="Porolog/Predicate/PredicateError.html" title="Porolog::Predicate::PredicateError (class)">PredicateError</a></span>
141
+
142
+ <small>(Porolog::Predicate)</small>
143
+
144
+ </li>
145
+
146
+ </ul>
147
+ </ul>
148
+
149
+
150
+ <ul id="alpha_S" class="alpha">
151
+ <li class="letter">S</li>
152
+ <ul>
153
+
154
+ <li>
155
+ <span class='object_link'><a href="Porolog/Scope.html" title="Porolog::Scope (class)">Scope</a></span>
156
+
157
+ <small>(Porolog)</small>
158
+
159
+ </li>
160
+
161
+ <li>
162
+ <span class='object_link'><a href="Porolog/Scope/ScopeError.html" title="Porolog::Scope::ScopeError (class)">ScopeError</a></span>
163
+
164
+ <small>(Porolog::Scope)</small>
165
+
166
+ </li>
167
+
168
+ </ul>
169
+ </ul>
170
+
171
+ </td>
172
+ </tr>
173
+ </table>
174
+
175
+ </div>
176
+
177
+ </div>
178
+
179
+ <div id="footer">
180
+ Generated on Mon Apr 22 16:27:39 2019 by
181
+ <a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
182
+ 0.9.19 (ruby-2.3.4).
183
+ </div>
184
+
185
+ </div>
186
+ </body>
187
+ </html>
@@ -0,0 +1,51 @@
1
+ <!DOCTYPE html>
2
+ <html>
3
+ <head>
4
+ <meta name="viewport" content="width=device-width, initial-scale=1.0">
5
+ <meta charset="utf-8" />
6
+
7
+ <link rel="stylesheet" href="css/full_list.css" type="text/css" media="screen" charset="utf-8" />
8
+
9
+ <link rel="stylesheet" href="css/common.css" type="text/css" media="screen" charset="utf-8" />
10
+
11
+
12
+
13
+ <script type="text/javascript" charset="utf-8" src="js/jquery.js"></script>
14
+
15
+ <script type="text/javascript" charset="utf-8" src="js/full_list.js"></script>
16
+
17
+
18
+ <title>Class List</title>
19
+ <base id="base_target" target="_parent" />
20
+ </head>
21
+ <body>
22
+ <div id="content">
23
+ <div class="fixed_header">
24
+ <h1 id="full_list_header">Class List</h1>
25
+ <div id="full_list_nav">
26
+
27
+ <span><a target="_self" href="class_list.html">
28
+ Classes
29
+ </a></span>
30
+
31
+ <span><a target="_self" href="method_list.html">
32
+ Methods
33
+ </a></span>
34
+
35
+ <span><a target="_self" href="file_list.html">
36
+ Files
37
+ </a></span>
38
+
39
+ </div>
40
+
41
+ <div id="search">Search: <input type="text" /></div>
42
+ </div>
43
+
44
+ <ul id="full_list" class="class">
45
+ <li id="object_" class="odd"><div class="item" style="padding-left:30px"><span class='object_link'><a href="top-level-namespace.html" title="Top Level Namespace (root)">Top Level Namespace</a></span></div></li>
46
+ <li id='object_Porolog' class='even'><div class='item' style='padding-left:30px'><a class='toggle'></a> <span class='object_link'><a href="Porolog.html" title="Porolog (module)">Porolog</a></span><small class='search_info'>Top Level Namespace</small></div><ul><li id='object_Porolog::Arguments' class='collapsed odd'><div class='item' style='padding-left:45px'><span class='object_link'><a href="Porolog/Arguments.html" title="Porolog::Arguments (class)">Arguments</a></span> &lt; Object<small class='search_info'>Porolog</small></div></li><li id='object_Porolog::PorologError' class='collapsed even'><div class='item' style='padding-left:45px'><span class='object_link'><a href="Porolog/PorologError.html" title="Porolog::PorologError (class)">PorologError</a></span> &lt; RuntimeError<small class='search_info'>Porolog</small></div></li><li id='object_Porolog::Predicate' class='collapsed odd'><div class='item' style='padding-left:45px'><a class='toggle'></a> <span class='object_link'><a href="Porolog/Predicate.html" title="Porolog::Predicate (class)">Predicate</a></span> &lt; Object<small class='search_info'>Porolog</small></div><ul><li id='object_Porolog::Predicate::NameError' class='collapsed'><div class='item' style='padding-left:60px'><span class='object_link'><a href="Porolog/Predicate/NameError.html" title="Porolog::Predicate::NameError (class)">NameError</a></span> &lt; PredicateError<small class='search_info'>Porolog::Predicate</small></div></li><li id='object_Porolog::Predicate::PredicateError' class='collapsed'><div class='item' style='padding-left:60px'><span class='object_link'><a href="Porolog/Predicate/PredicateError.html" title="Porolog::Predicate::PredicateError (class)">PredicateError</a></span> &lt; PorologError<small class='search_info'>Porolog::Predicate</small></div></li></ul></li><li id='object_Porolog::Scope' class='collapsed even'><div class='item' style='padding-left:45px'><a class='toggle'></a> <span class='object_link'><a href="Porolog/Scope.html" title="Porolog::Scope (class)">Scope</a></span> &lt; Object<small class='search_info'>Porolog</small></div><ul><li id='object_Porolog::Scope::NotPredicateError' class='collapsed'><div class='item' style='padding-left:60px'><span class='object_link'><a href="Porolog/Scope/NotPredicateError.html" title="Porolog::Scope::NotPredicateError (class)">NotPredicateError</a></span> &lt; ScopeError<small class='search_info'>Porolog::Scope</small></div></li><li id='object_Porolog::Scope::ScopeError' class='collapsed'><div class='item' style='padding-left:60px'><span class='object_link'><a href="Porolog/Scope/ScopeError.html" title="Porolog::Scope::ScopeError (class)">ScopeError</a></span> &lt; PorologError<small class='search_info'>Porolog::Scope</small></div></li></ul></li></ul></li>
47
+
48
+ </ul>
49
+ </div>
50
+ </body>
51
+ </html>