examen 1.2.4

Sign up to get free protection for your applications and to get access to all the features.
Files changed (83) hide show
  1. checksums.yaml +7 -0
  2. data/.coveralls.yml +1 -0
  3. data/.gitignore +14 -0
  4. data/.rspec +2 -0
  5. data/.travis.yml +6 -0
  6. data/Gemfile +8 -0
  7. data/Gemfile.lock +91 -0
  8. data/Guardfile +40 -0
  9. data/LICENSE.txt +22 -0
  10. data/README.md +65 -0
  11. data/README.rdoc +65 -0
  12. data/Rakefile +25 -0
  13. data/doc/prct10.pdf +0 -0
  14. data/doc/prct5.pdf +0 -0
  15. data/doc/prct6.pdf +0 -0
  16. data/doc/prct7.pdf +0 -0
  17. data/doc/prct8.pdf +0 -0
  18. data/doc/prct9.pdf +0 -0
  19. data/doc/pruebas/index.html +430 -0
  20. data/examen.gemspec +29 -0
  21. data/html/Exam.html +296 -0
  22. data/html/Examen.html +119 -0
  23. data/html/ExamenIu.html +278 -0
  24. data/html/Lista.html +536 -0
  25. data/html/Object.html +119 -0
  26. data/html/Pregunta.html +361 -0
  27. data/html/PreguntaVerdaderoFalso.html +169 -0
  28. data/html/Quiz.html +363 -0
  29. data/html/README_rdoc.html +154 -0
  30. data/html/created.rid +11 -0
  31. data/html/fonts.css +167 -0
  32. data/html/fonts/Lato-Light.ttf +0 -0
  33. data/html/fonts/Lato-LightItalic.ttf +0 -0
  34. data/html/fonts/Lato-Regular.ttf +0 -0
  35. data/html/fonts/Lato-RegularItalic.ttf +0 -0
  36. data/html/fonts/SourceCodePro-Bold.ttf +0 -0
  37. data/html/fonts/SourceCodePro-Regular.ttf +0 -0
  38. data/html/images/add.png +0 -0
  39. data/html/images/arrow_up.png +0 -0
  40. data/html/images/brick.png +0 -0
  41. data/html/images/brick_link.png +0 -0
  42. data/html/images/bug.png +0 -0
  43. data/html/images/bullet_black.png +0 -0
  44. data/html/images/bullet_toggle_minus.png +0 -0
  45. data/html/images/bullet_toggle_plus.png +0 -0
  46. data/html/images/date.png +0 -0
  47. data/html/images/delete.png +0 -0
  48. data/html/images/find.png +0 -0
  49. data/html/images/loadingAnimation.gif +0 -0
  50. data/html/images/macFFBgHack.png +0 -0
  51. data/html/images/package.png +0 -0
  52. data/html/images/page_green.png +0 -0
  53. data/html/images/page_white_text.png +0 -0
  54. data/html/images/page_white_width.png +0 -0
  55. data/html/images/plugin.png +0 -0
  56. data/html/images/ruby.png +0 -0
  57. data/html/images/tag_blue.png +0 -0
  58. data/html/images/tag_green.png +0 -0
  59. data/html/images/transparent.png +0 -0
  60. data/html/images/wrench.png +0 -0
  61. data/html/images/wrench_orange.png +0 -0
  62. data/html/images/zoom.png +0 -0
  63. data/html/index.html +178 -0
  64. data/html/js/darkfish.js +140 -0
  65. data/html/js/jquery.js +4 -0
  66. data/html/js/navigation.js +142 -0
  67. data/html/js/search.js +109 -0
  68. data/html/js/search_index.js +1 -0
  69. data/html/js/searcher.js +228 -0
  70. data/html/rdoc.css +580 -0
  71. data/html/table_of_contents.html +204 -0
  72. data/lib/examen.rb +3 -0
  73. data/lib/examen/base.rb +3 -0
  74. data/lib/examen/exam.rb +24 -0
  75. data/lib/examen/examen_iu.rb +38 -0
  76. data/lib/examen/lista.rb +108 -0
  77. data/lib/examen/pregunta.rb +38 -0
  78. data/lib/examen/pregunta_verdadero_falso.rb +16 -0
  79. data/lib/examen/quiz.rb +35 -0
  80. data/lib/examen/version.rb +4 -0
  81. data/spec/examen_spec.rb +334 -0
  82. data/spec/spec_helper.rb +99 -0
  83. metadata +229 -0
data/html/Object.html ADDED
@@ -0,0 +1,119 @@
1
+ <!DOCTYPE html>
2
+
3
+ <html>
4
+ <head>
5
+ <meta charset="UTF-8">
6
+
7
+ <title>class Object - RDoc Documentation</title>
8
+
9
+ <link href="./fonts.css" rel="stylesheet">
10
+ <link href="./rdoc.css" rel="stylesheet">
11
+
12
+ <script type="text/javascript">
13
+ var rdoc_rel_prefix = "./";
14
+ </script>
15
+
16
+ <script src="./js/jquery.js"></script>
17
+ <script src="./js/navigation.js"></script>
18
+ <script src="./js/search_index.js"></script>
19
+ <script src="./js/search.js"></script>
20
+ <script src="./js/searcher.js"></script>
21
+ <script src="./js/darkfish.js"></script>
22
+
23
+
24
+ <body id="top" role="document" class="class">
25
+ <nav role="navigation">
26
+ <div id="project-navigation">
27
+ <div id="home-section" role="region" title="Quick navigation" class="nav-section">
28
+ <h2>
29
+ <a href="./index.html" rel="home">Home</a>
30
+ </h2>
31
+
32
+ <div id="table-of-contents-navigation">
33
+ <a href="./table_of_contents.html#pages">Pages</a>
34
+ <a href="./table_of_contents.html#classes">Classes</a>
35
+ <a href="./table_of_contents.html#methods">Methods</a>
36
+ </div>
37
+ </div>
38
+
39
+ <div id="search-section" role="search" class="project-section initially-hidden">
40
+ <form action="#" method="get" accept-charset="utf-8">
41
+ <div id="search-field-wrapper">
42
+ <input id="search-field" role="combobox" aria-label="Search"
43
+ aria-autocomplete="list" aria-controls="search-results"
44
+ type="text" name="search" placeholder="Search" spellcheck="false"
45
+ title="Type to search, Up and Down to navigate, Enter to load">
46
+ </div>
47
+
48
+ <ul id="search-results" aria-label="Search Results"
49
+ aria-busy="false" aria-expanded="false"
50
+ aria-atomic="false" class="initially-hidden"></ul>
51
+ </form>
52
+ </div>
53
+
54
+ </div>
55
+
56
+
57
+
58
+ <div id="class-metadata">
59
+
60
+ <div id="parent-class-section" class="nav-section">
61
+ <h3>Parent</h3>
62
+
63
+
64
+ <p class="link">BasicObject
65
+
66
+ </div>
67
+
68
+
69
+
70
+
71
+ </div>
72
+ </nav>
73
+
74
+ <main role="main" aria-labelledby="class-Object">
75
+ <h1 id="class-Object" class="class">
76
+ class Object
77
+ </h1>
78
+
79
+ <section class="description">
80
+
81
+ </section>
82
+
83
+
84
+
85
+
86
+ <section id="5Buntitled-5D" class="documentation-section">
87
+
88
+
89
+
90
+
91
+
92
+ <section class="constants-list">
93
+ <header>
94
+ <h3>Constants</h3>
95
+ </header>
96
+ <dl>
97
+
98
+ <dt id="Nodo">Nodo
99
+
100
+ <dd>
101
+
102
+
103
+ </dl>
104
+ </section>
105
+
106
+
107
+
108
+
109
+
110
+ </section>
111
+ </main>
112
+
113
+
114
+ <footer id="validator-badges" role="contentinfo">
115
+ <p><a href="http://validator.w3.org/check/referer">Validate</a>
116
+ <p>Generated by <a href="http://rdoc.rubyforge.org">RDoc</a> 4.1.0.
117
+ <p>Based on <a href="http://deveiate.org/projects/Darkfish-Rdoc/">Darkfish</a> by <a href="http://deveiate.org">Michael Granger</a>.
118
+ </footer>
119
+
@@ -0,0 +1,361 @@
1
+ <!DOCTYPE html>
2
+
3
+ <html>
4
+ <head>
5
+ <meta charset="UTF-8">
6
+
7
+ <title>class Pregunta - RDoc Documentation</title>
8
+
9
+ <link href="./fonts.css" rel="stylesheet">
10
+ <link href="./rdoc.css" rel="stylesheet">
11
+
12
+ <script type="text/javascript">
13
+ var rdoc_rel_prefix = "./";
14
+ </script>
15
+
16
+ <script src="./js/jquery.js"></script>
17
+ <script src="./js/navigation.js"></script>
18
+ <script src="./js/search_index.js"></script>
19
+ <script src="./js/search.js"></script>
20
+ <script src="./js/searcher.js"></script>
21
+ <script src="./js/darkfish.js"></script>
22
+
23
+
24
+ <body id="top" role="document" class="class">
25
+ <nav role="navigation">
26
+ <div id="project-navigation">
27
+ <div id="home-section" role="region" title="Quick navigation" class="nav-section">
28
+ <h2>
29
+ <a href="./index.html" rel="home">Home</a>
30
+ </h2>
31
+
32
+ <div id="table-of-contents-navigation">
33
+ <a href="./table_of_contents.html#pages">Pages</a>
34
+ <a href="./table_of_contents.html#classes">Classes</a>
35
+ <a href="./table_of_contents.html#methods">Methods</a>
36
+ </div>
37
+ </div>
38
+
39
+ <div id="search-section" role="search" class="project-section initially-hidden">
40
+ <form action="#" method="get" accept-charset="utf-8">
41
+ <div id="search-field-wrapper">
42
+ <input id="search-field" role="combobox" aria-label="Search"
43
+ aria-autocomplete="list" aria-controls="search-results"
44
+ type="text" name="search" placeholder="Search" spellcheck="false"
45
+ title="Type to search, Up and Down to navigate, Enter to load">
46
+ </div>
47
+
48
+ <ul id="search-results" aria-label="Search Results"
49
+ aria-busy="false" aria-expanded="false"
50
+ aria-atomic="false" class="initially-hidden"></ul>
51
+ </form>
52
+ </div>
53
+
54
+ </div>
55
+
56
+
57
+
58
+ <div id="class-metadata">
59
+
60
+ <div id="parent-class-section" class="nav-section">
61
+ <h3>Parent</h3>
62
+
63
+
64
+ <p class="link"><a href="Object.html">Object</a>
65
+
66
+ </div>
67
+
68
+ <div id="includes-section" class="nav-section">
69
+ <h3>Included Modules</h3>
70
+
71
+ <ul class="link-list">
72
+
73
+
74
+ <li><span class="include">Comparable</span>
75
+
76
+
77
+ </ul>
78
+ </div>
79
+
80
+
81
+ <!-- Method Quickref -->
82
+ <div id="method-list-section" class="nav-section">
83
+ <h3>Methods</h3>
84
+
85
+ <ul class="link-list" role="directory">
86
+
87
+ <li ><a href="#method-c-new">::new</a>
88
+
89
+ <li ><a href="#method-i-3C-3D-3E">#&lt;=&gt;</a>
90
+
91
+ <li ><a href="#method-i-3D-3D">#==</a>
92
+
93
+ <li ><a href="#method-i-to_s">#to_s</a>
94
+
95
+ </ul>
96
+ </div>
97
+
98
+ </div>
99
+ </nav>
100
+
101
+ <main role="main" aria-labelledby="class-Pregunta">
102
+ <h1 id="class-Pregunta" class="class">
103
+ class Pregunta
104
+ </h1>
105
+
106
+ <section class="description">
107
+
108
+ <p>Clase gestora de una <a href="Pregunta.html">Pregunta</a> de multiples
109
+ opciones.</p>
110
+
111
+ </section>
112
+
113
+
114
+
115
+
116
+ <section id="5Buntitled-5D" class="documentation-section">
117
+
118
+
119
+
120
+
121
+
122
+
123
+
124
+ <section class="attribute-method-details" class="method-section">
125
+ <header>
126
+ <h3>Attributes</h3>
127
+ </header>
128
+
129
+
130
+ <div id="attribute-i-difficulty" class="method-detail">
131
+ <div class="method-heading attribute-method-heading">
132
+ <span class="method-name">difficulty</span><span
133
+ class="attribute-access-type">[RW]</span>
134
+ </div>
135
+
136
+ <div class="method-description">
137
+
138
+
139
+
140
+ </div>
141
+ </div>
142
+
143
+ <div id="attribute-i-distractors" class="method-detail">
144
+ <div class="method-heading attribute-method-heading">
145
+ <span class="method-name">distractors</span><span
146
+ class="attribute-access-type">[RW]</span>
147
+ </div>
148
+
149
+ <div class="method-description">
150
+
151
+
152
+
153
+ </div>
154
+ </div>
155
+
156
+ <div id="attribute-i-right" class="method-detail">
157
+ <div class="method-heading attribute-method-heading">
158
+ <span class="method-name">right</span><span
159
+ class="attribute-access-type">[RW]</span>
160
+ </div>
161
+
162
+ <div class="method-description">
163
+
164
+
165
+
166
+ </div>
167
+ </div>
168
+
169
+ <div id="attribute-i-text" class="method-detail">
170
+ <div class="method-heading attribute-method-heading">
171
+ <span class="method-name">text</span><span
172
+ class="attribute-access-type">[RW]</span>
173
+ </div>
174
+
175
+ <div class="method-description">
176
+
177
+
178
+
179
+ </div>
180
+ </div>
181
+
182
+ </section>
183
+
184
+
185
+
186
+ <section id="public-class-5Buntitled-5D-method-details" class="method-section">
187
+ <header>
188
+ <h3>Public Class Methods</h3>
189
+ </header>
190
+
191
+
192
+ <div id="method-c-new" class="method-detail ">
193
+
194
+ <div class="method-heading">
195
+ <span class="method-name">new</span><span
196
+ class="method-args">(args)</span>
197
+
198
+ <span class="method-click-advice">click to toggle source</span>
199
+
200
+ </div>
201
+
202
+
203
+ <div class="method-description">
204
+
205
+ <p>Instancia una nueva <a href="Pregunta.html">Pregunta</a>, a partir de un
206
+ texto, una respuesta correcta, un conjunto de respuestas falsas y
207
+ opcionalmente la dificultad.</p>
208
+
209
+
210
+
211
+
212
+ <div class="method-source-code" id="new-source">
213
+ <pre><span class="ruby-comment"># File lib/examen/pregunta.rb, line 7</span>
214
+ <span class="ruby-keyword">def</span> <span class="ruby-identifier">initialize</span>(<span class="ruby-identifier">args</span>)
215
+ <span class="ruby-identifier">raise</span> <span class="ruby-constant">ArgumentError</span>, <span class="ruby-string">&quot;Esperada pregunta (:text)&quot;</span> <span class="ruby-keyword">unless</span> <span class="ruby-identifier">args</span>[<span class="ruby-value">:text</span>]
216
+ <span class="ruby-identifier">raise</span> <span class="ruby-constant">ArgumentError</span>, <span class="ruby-string">&quot;Esperada respuesta correcta (:right)&quot;</span> <span class="ruby-keyword">unless</span> <span class="ruby-identifier">args</span>[<span class="ruby-value">:right</span>]
217
+ <span class="ruby-identifier">raise</span> <span class="ruby-constant">ArgumentError</span>, <span class="ruby-string">&quot;Esperadas respuestas incorrectas (:distractors)&quot;</span> <span class="ruby-keyword">unless</span> <span class="ruby-identifier">args</span>[<span class="ruby-value">:distractors</span>]
218
+ <span class="ruby-ivar">@text</span> = <span class="ruby-identifier">args</span>[<span class="ruby-value">:text</span>]
219
+ <span class="ruby-ivar">@right</span> = <span class="ruby-identifier">args</span>[<span class="ruby-value">:right</span>]
220
+ <span class="ruby-ivar">@distractors</span> = <span class="ruby-identifier">args</span>[<span class="ruby-value">:distractors</span>]
221
+ <span class="ruby-ivar">@difficulty</span> = (<span class="ruby-identifier">args</span>.<span class="ruby-identifier">key?</span><span class="ruby-value">:difficulty</span>)<span class="ruby-operator">?</span><span class="ruby-identifier">args</span>[<span class="ruby-value">:difficulty</span>]<span class="ruby-operator">:</span><span class="ruby-value">1</span>
222
+ <span class="ruby-keyword">end</span></pre>
223
+ </div>
224
+
225
+ </div>
226
+
227
+
228
+
229
+
230
+ </div>
231
+
232
+
233
+ </section>
234
+
235
+ <section id="public-instance-5Buntitled-5D-method-details" class="method-section">
236
+ <header>
237
+ <h3>Public Instance Methods</h3>
238
+ </header>
239
+
240
+
241
+ <div id="method-i-3C-3D-3E" class="method-detail ">
242
+
243
+ <div class="method-heading">
244
+ <span class="method-name">&lt;=&gt;</span><span
245
+ class="method-args">(p)</span>
246
+
247
+ <span class="method-click-advice">click to toggle source</span>
248
+
249
+ </div>
250
+
251
+
252
+ <div class="method-description">
253
+
254
+ <p>Sobrecarga el operador &lt;=&gt; para comparar por dificultad.</p>
255
+
256
+
257
+
258
+
259
+ <div class="method-source-code" id="3C-3D-3E-source">
260
+ <pre><span class="ruby-comment"># File lib/examen/pregunta.rb, line 30</span>
261
+ <span class="ruby-keyword">def</span> <span class="ruby-operator">&lt;=&gt;</span>(<span class="ruby-identifier">p</span>)
262
+ <span class="ruby-ivar">@difficulty</span> <span class="ruby-operator">&lt;=&gt;</span> <span class="ruby-identifier">p</span>.<span class="ruby-identifier">difficulty</span>
263
+ <span class="ruby-keyword">end</span></pre>
264
+ </div>
265
+
266
+ </div>
267
+
268
+
269
+
270
+
271
+ </div>
272
+
273
+
274
+ <div id="method-i-3D-3D" class="method-detail ">
275
+
276
+ <div class="method-heading">
277
+ <span class="method-name">==</span><span
278
+ class="method-args">(p)</span>
279
+
280
+ <span class="method-click-advice">click to toggle source</span>
281
+
282
+ </div>
283
+
284
+
285
+ <div class="method-description">
286
+
287
+ <p>Sobrecarga el operador == para comparar por el texto.</p>
288
+
289
+
290
+
291
+
292
+ <div class="method-source-code" id="3D-3D-source">
293
+ <pre><span class="ruby-comment"># File lib/examen/pregunta.rb, line 34</span>
294
+ <span class="ruby-keyword">def</span> <span class="ruby-operator">==</span>(<span class="ruby-identifier">p</span>)
295
+ <span class="ruby-ivar">@text</span>.<span class="ruby-identifier">eql?</span><span class="ruby-identifier">p</span>.<span class="ruby-identifier">text</span>
296
+ <span class="ruby-keyword">end</span></pre>
297
+ </div>
298
+
299
+ </div>
300
+
301
+
302
+
303
+
304
+ </div>
305
+
306
+
307
+ <div id="method-i-to_s" class="method-detail ">
308
+
309
+ <div class="method-heading">
310
+ <span class="method-name">to_s</span><span
311
+ class="method-args">()</span>
312
+
313
+ <span class="method-click-advice">click to toggle source</span>
314
+
315
+ </div>
316
+
317
+
318
+ <div class="method-description">
319
+
320
+ <p>Definición del Metodo <a href="Pregunta.html#method-i-to_s">#to_s</a> para
321
+ mostrar una pregunta.</p>
322
+
323
+
324
+
325
+
326
+ <div class="method-source-code" id="to_s-source">
327
+ <pre><span class="ruby-comment"># File lib/examen/pregunta.rb, line 17</span>
328
+ <span class="ruby-keyword">def</span> <span class="ruby-identifier">to_s</span>
329
+ <span class="ruby-identifier">opciones</span> = <span class="ruby-ivar">@distractors</span> <span class="ruby-operator">+</span> [<span class="ruby-ivar">@right</span>]
330
+ <span class="ruby-identifier">opciones</span> = <span class="ruby-identifier">opciones</span>.<span class="ruby-identifier">shuffle</span>
331
+ <span class="ruby-identifier">s</span> = <span class="ruby-node">&quot;#{@text}\n&quot;</span>
332
+ <span class="ruby-identifier">letras</span> = (<span class="ruby-string">&#39;a&#39;</span><span class="ruby-operator">..</span><span class="ruby-string">&#39;z&#39;</span>).<span class="ruby-identifier">to_a</span>[<span class="ruby-value">0</span><span class="ruby-operator">..</span>(<span class="ruby-identifier">opciones</span>.<span class="ruby-identifier">size</span> <span class="ruby-operator">-</span> <span class="ruby-value">1</span>)]
333
+ <span class="ruby-identifier">i</span> = <span class="ruby-value">0</span>
334
+ <span class="ruby-identifier">opciones</span>.<span class="ruby-identifier">each</span> <span class="ruby-keyword">do</span> <span class="ruby-operator">|</span><span class="ruby-identifier">o</span><span class="ruby-operator">|</span>
335
+ <span class="ruby-identifier">s</span> <span class="ruby-operator">+=</span> <span class="ruby-node">&quot;#{letras[i]}) #{o}\n&quot;</span>
336
+ <span class="ruby-identifier">i</span> <span class="ruby-operator">+=</span> <span class="ruby-value">1</span>
337
+ <span class="ruby-keyword">end</span>
338
+ <span class="ruby-identifier">s</span>
339
+ <span class="ruby-keyword">end</span></pre>
340
+ </div>
341
+
342
+ </div>
343
+
344
+
345
+
346
+
347
+ </div>
348
+
349
+
350
+ </section>
351
+
352
+ </section>
353
+ </main>
354
+
355
+
356
+ <footer id="validator-badges" role="contentinfo">
357
+ <p><a href="http://validator.w3.org/check/referer">Validate</a>
358
+ <p>Generated by <a href="http://rdoc.rubyforge.org">RDoc</a> 4.1.0.
359
+ <p>Based on <a href="http://deveiate.org/projects/Darkfish-Rdoc/">Darkfish</a> by <a href="http://deveiate.org">Michael Granger</a>.
360
+ </footer>
361
+