question-simpleChoice 0.0.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +7 -0
- data/#question-simpleChoice.gemspec# +27 -0
- data/.coveralls.yml +1 -0
- data/.gitignore +15 -0
- data/.rspec +2 -0
- data/.travis.yml +3 -0
- data/.yardoc/checksums +13 -0
- data/.yardoc/object_types +0 -0
- data/.yardoc/objects/root.dat +0 -0
- data/.yardoc/proxy_types +0 -0
- data/Gemfile +7 -0
- data/Guardfile +7 -0
- data/LICENSE.txt +22 -0
- data/README.md +32 -0
- data/Rakefile +15 -0
- data/doc/Examen.html +766 -0
- data/doc/Interfaz.html +440 -0
- data/doc/Lista.html +929 -0
- data/doc/Lista/Node.html +397 -0
- data/doc/Node.html +516 -0
- data/doc/Question.html +117 -0
- data/doc/Question/SimpleChoice.html +132 -0
- data/doc/Question/TrueOrFalse.html +134 -0
- data/doc/QuestionFather.html +565 -0
- data/doc/SimpleChoice.html +505 -0
- data/doc/TrueOrFalse.html +279 -0
- data/doc/_index.html +207 -0
- data/doc/class_list.html +58 -0
- data/doc/css/common.css +1 -0
- data/doc/css/full_list.css +57 -0
- data/doc/css/style.css +339 -0
- data/doc/file.README.html +110 -0
- data/doc/file_list.html +60 -0
- data/doc/frames.html +26 -0
- data/doc/index.html +110 -0
- data/doc/js/app.js +219 -0
- data/doc/js/full_list.js +181 -0
- data/doc/js/jquery.js +4 -0
- data/doc/method_list.html +309 -0
- data/doc/top-level-namespace.html +114 -0
- data/lib/exam/examen.rb +85 -0
- data/lib/interfaz/interfaz.rb +49 -0
- data/lib/interfaz/interfazV2.rb +38 -0
- data/lib/node/node.rb +9 -0
- data/lib/nodelist/list.rb +119 -0
- data/lib/question/questionFather.rb +2 -0
- data/lib/question/questionFather/base.rb +16 -0
- data/lib/question/questionFather/version.rb +5 -0
- data/lib/question/simpleChoice.rb +2 -0
- data/lib/question/simpleChoice/base.rb +17 -0
- data/lib/question/simpleChoice/version.rb +5 -0
- data/lib/question/trueOrFalse.rb +2 -0
- data/lib/question/trueOrFalse/base.rb +10 -0
- data/lib/question/trueOrFalse/version.rb +5 -0
- data/lib/quiz/quiz.rb +58 -0
- data/prueba.html +1 -0
- data/prueba.rb +48 -0
- data/question-simpleChoice.gemspec +27 -0
- data/spec/list_spec.rb +51 -0
- data/spec/quiz_spec.rb +31 -0
- data/spec/simpleChoice_spec.rb +106 -0
- data/spec/spec_examen.rb +21 -0
- data/spec/spec_helper.rb +93 -0
- data/test.html +310 -0
- metadata +183 -0
@@ -0,0 +1,505 @@
|
|
1
|
+
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
|
2
|
+
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
3
|
+
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
|
4
|
+
<head>
|
5
|
+
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
|
6
|
+
<title>
|
7
|
+
Class: SimpleChoice
|
8
|
+
|
9
|
+
— Documentation by YARD 0.8.7.6
|
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
|
+
hasFrames = window.top.frames.main ? true : false;
|
19
|
+
relpath = '';
|
20
|
+
framesUrl = "frames.html#!SimpleChoice.html";
|
21
|
+
</script>
|
22
|
+
|
23
|
+
|
24
|
+
<script type="text/javascript" charset="utf-8" src="js/jquery.js"></script>
|
25
|
+
|
26
|
+
<script type="text/javascript" charset="utf-8" src="js/app.js"></script>
|
27
|
+
|
28
|
+
|
29
|
+
</head>
|
30
|
+
<body>
|
31
|
+
<div id="header">
|
32
|
+
<div id="menu">
|
33
|
+
|
34
|
+
<a href="_index.html">Index (S)</a> »
|
35
|
+
|
36
|
+
|
37
|
+
<span class="title">SimpleChoice</span>
|
38
|
+
|
39
|
+
|
40
|
+
<div class="noframes"><span class="title">(</span><a href="." target="_top">no frames</a><span class="title">)</span></div>
|
41
|
+
</div>
|
42
|
+
|
43
|
+
<div id="search">
|
44
|
+
|
45
|
+
<a class="full_list_link" id="class_list_link"
|
46
|
+
href="class_list.html">
|
47
|
+
Class List
|
48
|
+
</a>
|
49
|
+
|
50
|
+
<a class="full_list_link" id="method_list_link"
|
51
|
+
href="method_list.html">
|
52
|
+
Method List
|
53
|
+
</a>
|
54
|
+
|
55
|
+
<a class="full_list_link" id="file_list_link"
|
56
|
+
href="file_list.html">
|
57
|
+
File List
|
58
|
+
</a>
|
59
|
+
|
60
|
+
</div>
|
61
|
+
<div class="clear"></div>
|
62
|
+
</div>
|
63
|
+
|
64
|
+
<iframe id="search_frame"></iframe>
|
65
|
+
|
66
|
+
<div id="content"><h1>Class: SimpleChoice
|
67
|
+
|
68
|
+
|
69
|
+
|
70
|
+
</h1>
|
71
|
+
|
72
|
+
<dl class="box">
|
73
|
+
|
74
|
+
<dt class="r1">Inherits:</dt>
|
75
|
+
<dd class="r1">
|
76
|
+
<span class="inheritName"><span class='object_link'><a href="QuestionFather.html" title="QuestionFather (class)">QuestionFather</a></span></span>
|
77
|
+
|
78
|
+
<ul class="fullTree">
|
79
|
+
<li>Object</li>
|
80
|
+
|
81
|
+
<li class="next"><span class='object_link'><a href="QuestionFather.html" title="QuestionFather (class)">QuestionFather</a></span></li>
|
82
|
+
|
83
|
+
<li class="next">SimpleChoice</li>
|
84
|
+
|
85
|
+
</ul>
|
86
|
+
<a href="#" class="inheritanceTree">show all</a>
|
87
|
+
|
88
|
+
</dd>
|
89
|
+
|
90
|
+
|
91
|
+
|
92
|
+
|
93
|
+
|
94
|
+
|
95
|
+
|
96
|
+
|
97
|
+
|
98
|
+
<dt class="r2 last">Defined in:</dt>
|
99
|
+
<dd class="r2 last">lib/question/simpleChoice/base.rb</dd>
|
100
|
+
|
101
|
+
</dl>
|
102
|
+
<div class="clear"></div>
|
103
|
+
|
104
|
+
|
105
|
+
|
106
|
+
|
107
|
+
|
108
|
+
<h2>Instance Attribute Summary <small>(<a href="#" class="summary_toggle">collapse</a>)</small></h2>
|
109
|
+
<ul class="summary">
|
110
|
+
|
111
|
+
<li class="public ">
|
112
|
+
<span class="summary_signature">
|
113
|
+
|
114
|
+
<a href="#distractor-instance_method" title="#distractor (instance method)">- (Object) <strong>distractor</strong> </a>
|
115
|
+
|
116
|
+
|
117
|
+
|
118
|
+
</span>
|
119
|
+
|
120
|
+
|
121
|
+
|
122
|
+
|
123
|
+
|
124
|
+
|
125
|
+
|
126
|
+
|
127
|
+
|
128
|
+
|
129
|
+
|
130
|
+
|
131
|
+
<span class="summary_desc"><div class='inline'>
|
132
|
+
<p>Returns the value of attribute distractor.</p>
|
133
|
+
</div></span>
|
134
|
+
|
135
|
+
</li>
|
136
|
+
|
137
|
+
|
138
|
+
<li class="public ">
|
139
|
+
<span class="summary_signature">
|
140
|
+
|
141
|
+
<a href="#right-instance_method" title="#right (instance method)">- (Object) <strong>right</strong> </a>
|
142
|
+
|
143
|
+
|
144
|
+
|
145
|
+
</span>
|
146
|
+
|
147
|
+
|
148
|
+
|
149
|
+
|
150
|
+
|
151
|
+
|
152
|
+
|
153
|
+
|
154
|
+
|
155
|
+
|
156
|
+
|
157
|
+
|
158
|
+
<span class="summary_desc"><div class='inline'>
|
159
|
+
<p>Returns the value of attribute right.</p>
|
160
|
+
</div></span>
|
161
|
+
|
162
|
+
</li>
|
163
|
+
|
164
|
+
|
165
|
+
<li class="public ">
|
166
|
+
<span class="summary_signature">
|
167
|
+
|
168
|
+
<a href="#text-instance_method" title="#text (instance method)">- (Object) <strong>text</strong> </a>
|
169
|
+
|
170
|
+
|
171
|
+
|
172
|
+
</span>
|
173
|
+
|
174
|
+
|
175
|
+
|
176
|
+
|
177
|
+
|
178
|
+
|
179
|
+
|
180
|
+
|
181
|
+
|
182
|
+
|
183
|
+
|
184
|
+
|
185
|
+
<span class="summary_desc"><div class='inline'>
|
186
|
+
<p>Returns the value of attribute text.</p>
|
187
|
+
</div></span>
|
188
|
+
|
189
|
+
</li>
|
190
|
+
|
191
|
+
|
192
|
+
</ul>
|
193
|
+
|
194
|
+
|
195
|
+
|
196
|
+
|
197
|
+
|
198
|
+
<h3 class="inherited">Attributes inherited from <span class='object_link'><a href="QuestionFather.html" title="QuestionFather (class)">QuestionFather</a></span></h3>
|
199
|
+
<p class="inherited"><span class='object_link'><a href="QuestionFather.html#dif-instance_method" title="QuestionFather#dif (method)">#dif</a></span></p>
|
200
|
+
|
201
|
+
|
202
|
+
|
203
|
+
<h2>
|
204
|
+
Instance Method Summary
|
205
|
+
<small>(<a href="#" class="summary_toggle">collapse</a>)</small>
|
206
|
+
</h2>
|
207
|
+
|
208
|
+
<ul class="summary">
|
209
|
+
|
210
|
+
<li class="public ">
|
211
|
+
<span class="summary_signature">
|
212
|
+
|
213
|
+
<a href="#initialize-instance_method" title="#initialize (instance method)">- (SimpleChoice) <strong>initialize</strong>(args) </a>
|
214
|
+
|
215
|
+
|
216
|
+
|
217
|
+
</span>
|
218
|
+
|
219
|
+
|
220
|
+
<span class="note title constructor">constructor</span>
|
221
|
+
|
222
|
+
|
223
|
+
|
224
|
+
|
225
|
+
|
226
|
+
|
227
|
+
|
228
|
+
|
229
|
+
<span class="summary_desc"><div class='inline'>
|
230
|
+
<p>A new instance of SimpleChoice.</p>
|
231
|
+
</div></span>
|
232
|
+
|
233
|
+
</li>
|
234
|
+
|
235
|
+
|
236
|
+
<li class="public ">
|
237
|
+
<span class="summary_signature">
|
238
|
+
|
239
|
+
<a href="#to_s-instance_method" title="#to_s (instance method)">- (Object) <strong>to_s</strong> </a>
|
240
|
+
|
241
|
+
|
242
|
+
|
243
|
+
</span>
|
244
|
+
|
245
|
+
|
246
|
+
|
247
|
+
|
248
|
+
|
249
|
+
|
250
|
+
|
251
|
+
|
252
|
+
|
253
|
+
<span class="summary_desc"><div class='inline'></div></span>
|
254
|
+
|
255
|
+
</li>
|
256
|
+
|
257
|
+
|
258
|
+
</ul>
|
259
|
+
|
260
|
+
|
261
|
+
|
262
|
+
|
263
|
+
|
264
|
+
|
265
|
+
|
266
|
+
|
267
|
+
|
268
|
+
|
269
|
+
|
270
|
+
<h3 class="inherited">Methods inherited from <span class='object_link'><a href="QuestionFather.html" title="QuestionFather (class)">QuestionFather</a></span></h3>
|
271
|
+
<p class="inherited"><span class='object_link'><a href="QuestionFather.html#%3C%3D%3E-instance_method" title="QuestionFather#<=> (method)">#<=></a></span></p>
|
272
|
+
|
273
|
+
<div id="constructor_details" class="method_details_list">
|
274
|
+
<h2>Constructor Details</h2>
|
275
|
+
|
276
|
+
<div class="method_details first">
|
277
|
+
<h3 class="signature first" id="initialize-instance_method">
|
278
|
+
|
279
|
+
- (<tt><span class='object_link'><a href="" title="SimpleChoice (class)">SimpleChoice</a></span></tt>) <strong>initialize</strong>(args)
|
280
|
+
|
281
|
+
|
282
|
+
|
283
|
+
|
284
|
+
|
285
|
+
</h3><div class="docstring">
|
286
|
+
<div class="discussion">
|
287
|
+
|
288
|
+
<p>Returns a new instance of SimpleChoice</p>
|
289
|
+
|
290
|
+
|
291
|
+
</div>
|
292
|
+
</div>
|
293
|
+
<div class="tags">
|
294
|
+
|
295
|
+
|
296
|
+
</div><table class="source_code">
|
297
|
+
<tr>
|
298
|
+
<td>
|
299
|
+
<pre class="lines">
|
300
|
+
|
301
|
+
|
302
|
+
5
|
303
|
+
6
|
304
|
+
7</pre>
|
305
|
+
</td>
|
306
|
+
<td>
|
307
|
+
<pre class="code"><span class="info file"># File 'lib/question/simpleChoice/base.rb', line 5</span>
|
308
|
+
|
309
|
+
<span class='kw'>def</span> <span class='id identifier rubyid_initialize'>initialize</span><span class='lparen'>(</span><span class='id identifier rubyid_args'>args</span><span class='rparen'>)</span>
|
310
|
+
<span class='kw'>super</span>
|
311
|
+
<span class='kw'>end</span></pre>
|
312
|
+
</td>
|
313
|
+
</tr>
|
314
|
+
</table>
|
315
|
+
</div>
|
316
|
+
|
317
|
+
</div>
|
318
|
+
|
319
|
+
<div id="instance_attr_details" class="attr_details">
|
320
|
+
<h2>Instance Attribute Details</h2>
|
321
|
+
|
322
|
+
|
323
|
+
<span id="distractor=-instance_method"></span>
|
324
|
+
<div class="method_details first">
|
325
|
+
<h3 class="signature first" id="distractor-instance_method">
|
326
|
+
|
327
|
+
- (<tt>Object</tt>) <strong>distractor</strong>
|
328
|
+
|
329
|
+
|
330
|
+
|
331
|
+
|
332
|
+
|
333
|
+
</h3><div class="docstring">
|
334
|
+
<div class="discussion">
|
335
|
+
|
336
|
+
<p>Returns the value of attribute distractor</p>
|
337
|
+
|
338
|
+
|
339
|
+
</div>
|
340
|
+
</div>
|
341
|
+
<div class="tags">
|
342
|
+
|
343
|
+
|
344
|
+
</div><table class="source_code">
|
345
|
+
<tr>
|
346
|
+
<td>
|
347
|
+
<pre class="lines">
|
348
|
+
|
349
|
+
|
350
|
+
4
|
351
|
+
5
|
352
|
+
6</pre>
|
353
|
+
</td>
|
354
|
+
<td>
|
355
|
+
<pre class="code"><span class="info file"># File 'lib/question/simpleChoice/base.rb', line 4</span>
|
356
|
+
|
357
|
+
<span class='kw'>def</span> <span class='id identifier rubyid_distractor'>distractor</span>
|
358
|
+
<span class='ivar'>@distractor</span>
|
359
|
+
<span class='kw'>end</span></pre>
|
360
|
+
</td>
|
361
|
+
</tr>
|
362
|
+
</table>
|
363
|
+
</div>
|
364
|
+
|
365
|
+
|
366
|
+
<span id="right=-instance_method"></span>
|
367
|
+
<div class="method_details ">
|
368
|
+
<h3 class="signature " id="right-instance_method">
|
369
|
+
|
370
|
+
- (<tt>Object</tt>) <strong>right</strong>
|
371
|
+
|
372
|
+
|
373
|
+
|
374
|
+
|
375
|
+
|
376
|
+
</h3><div class="docstring">
|
377
|
+
<div class="discussion">
|
378
|
+
|
379
|
+
<p>Returns the value of attribute right</p>
|
380
|
+
|
381
|
+
|
382
|
+
</div>
|
383
|
+
</div>
|
384
|
+
<div class="tags">
|
385
|
+
|
386
|
+
|
387
|
+
</div><table class="source_code">
|
388
|
+
<tr>
|
389
|
+
<td>
|
390
|
+
<pre class="lines">
|
391
|
+
|
392
|
+
|
393
|
+
4
|
394
|
+
5
|
395
|
+
6</pre>
|
396
|
+
</td>
|
397
|
+
<td>
|
398
|
+
<pre class="code"><span class="info file"># File 'lib/question/simpleChoice/base.rb', line 4</span>
|
399
|
+
|
400
|
+
<span class='kw'>def</span> <span class='id identifier rubyid_right'>right</span>
|
401
|
+
<span class='ivar'>@right</span>
|
402
|
+
<span class='kw'>end</span></pre>
|
403
|
+
</td>
|
404
|
+
</tr>
|
405
|
+
</table>
|
406
|
+
</div>
|
407
|
+
|
408
|
+
|
409
|
+
<span id="text=-instance_method"></span>
|
410
|
+
<div class="method_details ">
|
411
|
+
<h3 class="signature " id="text-instance_method">
|
412
|
+
|
413
|
+
- (<tt>Object</tt>) <strong>text</strong>
|
414
|
+
|
415
|
+
|
416
|
+
|
417
|
+
|
418
|
+
|
419
|
+
</h3><div class="docstring">
|
420
|
+
<div class="discussion">
|
421
|
+
|
422
|
+
<p>Returns the value of attribute text</p>
|
423
|
+
|
424
|
+
|
425
|
+
</div>
|
426
|
+
</div>
|
427
|
+
<div class="tags">
|
428
|
+
|
429
|
+
|
430
|
+
</div><table class="source_code">
|
431
|
+
<tr>
|
432
|
+
<td>
|
433
|
+
<pre class="lines">
|
434
|
+
|
435
|
+
|
436
|
+
4
|
437
|
+
5
|
438
|
+
6</pre>
|
439
|
+
</td>
|
440
|
+
<td>
|
441
|
+
<pre class="code"><span class="info file"># File 'lib/question/simpleChoice/base.rb', line 4</span>
|
442
|
+
|
443
|
+
<span class='kw'>def</span> <span class='id identifier rubyid_text'>text</span>
|
444
|
+
<span class='ivar'>@text</span>
|
445
|
+
<span class='kw'>end</span></pre>
|
446
|
+
</td>
|
447
|
+
</tr>
|
448
|
+
</table>
|
449
|
+
</div>
|
450
|
+
|
451
|
+
</div>
|
452
|
+
|
453
|
+
|
454
|
+
<div id="instance_method_details" class="method_details_list">
|
455
|
+
<h2>Instance Method Details</h2>
|
456
|
+
|
457
|
+
|
458
|
+
<div class="method_details first">
|
459
|
+
<h3 class="signature first" id="to_s-instance_method">
|
460
|
+
|
461
|
+
- (<tt>Object</tt>) <strong>to_s</strong>
|
462
|
+
|
463
|
+
|
464
|
+
|
465
|
+
|
466
|
+
|
467
|
+
</h3><table class="source_code">
|
468
|
+
<tr>
|
469
|
+
<td>
|
470
|
+
<pre class="lines">
|
471
|
+
|
472
|
+
|
473
|
+
9
|
474
|
+
10
|
475
|
+
11
|
476
|
+
12
|
477
|
+
13
|
478
|
+
14</pre>
|
479
|
+
</td>
|
480
|
+
<td>
|
481
|
+
<pre class="code"><span class="info file"># File 'lib/question/simpleChoice/base.rb', line 9</span>
|
482
|
+
|
483
|
+
<span class='kw'>def</span> <span class='id identifier rubyid_to_s'>to_s</span>
|
484
|
+
<span class='id identifier rubyid_options'>options</span> <span class='op'>=</span> <span class='ivar'>@distractor</span> <span class='op'>+</span> <span class='lbracket'>[</span><span class='ivar'>@right</span><span class='rbracket'>]</span>
|
485
|
+
<span class='id identifier rubyid_options'>options</span> <span class='op'>=</span> <span class='id identifier rubyid_options'>options</span><span class='period'>.</span><span class='id identifier rubyid_shuffle'>shuffle</span>
|
486
|
+
<span class='id identifier rubyid_puts'>puts</span> <span class='tstring'><span class='tstring_beg'>"</span><span class='tstring_content'>- Elige la pregunta correcta de la siguiente pregunta </span><span class='embexpr_beg'>#{</span><span class='ivar'>@text</span><span class='embexpr_end'>}</span><span class='tstring_content'> ?</span><span class='tstring_end'>"</span></span>
|
487
|
+
<span class='id identifier rubyid_options'>options</span><span class='period'>.</span><span class='id identifier rubyid_each'>each</span> <span class='lbrace'>{</span><span class='op'>|</span><span class='id identifier rubyid_o'>o</span><span class='op'>|</span><span class='rbrace'>}</span>
|
488
|
+
<span class='kw'>end</span></pre>
|
489
|
+
</td>
|
490
|
+
</tr>
|
491
|
+
</table>
|
492
|
+
</div>
|
493
|
+
|
494
|
+
</div>
|
495
|
+
|
496
|
+
</div>
|
497
|
+
|
498
|
+
<div id="footer">
|
499
|
+
Generated on Thu Nov 27 14:39:06 2014 by
|
500
|
+
<a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
|
501
|
+
0.8.7.6 (ruby-2.0.0).
|
502
|
+
</div>
|
503
|
+
|
504
|
+
</body>
|
505
|
+
</html>
|