exam_LPP_T_5 0.1.2

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.
Files changed (81) hide show
  1. checksums.yaml +7 -0
  2. data/.coveralls.yml +2 -0
  3. data/.gitignore +20 -0
  4. data/.rspec +2 -0
  5. data/.travis.yml +7 -0
  6. data/Gemfile +4 -0
  7. data/Guardfile +38 -0
  8. data/LICENSE.txt +22 -0
  9. data/README.md +7 -0
  10. data/README.rdoc +3 -0
  11. data/Rakefile +13 -0
  12. data/exam.gemspec +32 -0
  13. data/html/Exam.html +112 -0
  14. data/html/Exam/DList.html +569 -0
  15. data/html/Exam/Examen.html +335 -0
  16. data/html/Exam/Interfaz.html +333 -0
  17. data/html/Exam/List.html +323 -0
  18. data/html/Exam/Test.html +384 -0
  19. data/html/Exam/ToF.html +164 -0
  20. data/html/Inversor.html +112 -0
  21. data/html/Inverter.html +164 -0
  22. data/html/Object.html +119 -0
  23. data/html/README_rdoc.html +86 -0
  24. data/html/created.rid +13 -0
  25. data/html/fonts.css +167 -0
  26. data/html/fonts/Lato-Light.ttf +0 -0
  27. data/html/fonts/Lato-LightItalic.ttf +0 -0
  28. data/html/fonts/Lato-Regular.ttf +0 -0
  29. data/html/fonts/Lato-RegularItalic.ttf +0 -0
  30. data/html/fonts/SourceCodePro-Bold.ttf +0 -0
  31. data/html/fonts/SourceCodePro-Regular.ttf +0 -0
  32. data/html/images/add.png +0 -0
  33. data/html/images/arrow_up.png +0 -0
  34. data/html/images/brick.png +0 -0
  35. data/html/images/brick_link.png +0 -0
  36. data/html/images/bug.png +0 -0
  37. data/html/images/bullet_black.png +0 -0
  38. data/html/images/bullet_toggle_minus.png +0 -0
  39. data/html/images/bullet_toggle_plus.png +0 -0
  40. data/html/images/date.png +0 -0
  41. data/html/images/delete.png +0 -0
  42. data/html/images/find.png +0 -0
  43. data/html/images/loadingAnimation.gif +0 -0
  44. data/html/images/macFFBgHack.png +0 -0
  45. data/html/images/package.png +0 -0
  46. data/html/images/page_green.png +0 -0
  47. data/html/images/page_white_text.png +0 -0
  48. data/html/images/page_white_width.png +0 -0
  49. data/html/images/plugin.png +0 -0
  50. data/html/images/ruby.png +0 -0
  51. data/html/images/tag_blue.png +0 -0
  52. data/html/images/tag_green.png +0 -0
  53. data/html/images/transparent.png +0 -0
  54. data/html/images/wrench.png +0 -0
  55. data/html/images/wrench_orange.png +0 -0
  56. data/html/images/zoom.png +0 -0
  57. data/html/index.html +108 -0
  58. data/html/js/darkfish.js +140 -0
  59. data/html/js/jquery.js +4 -0
  60. data/html/js/navigation.js +142 -0
  61. data/html/js/search.js +109 -0
  62. data/html/js/search_index.js +1 -0
  63. data/html/js/searcher.js +228 -0
  64. data/html/rdoc.css +580 -0
  65. data/html/table_of_contents.html +222 -0
  66. data/lib/exam.rb +8 -0
  67. data/lib/exam/d_list.rb +124 -0
  68. data/lib/exam/examen.rb +38 -0
  69. data/lib/exam/interfaz.rb +34 -0
  70. data/lib/exam/list.rb +57 -0
  71. data/lib/exam/quiz.rb +39 -0
  72. data/lib/exam/test.rb +37 -0
  73. data/lib/exam/tof.rb +9 -0
  74. data/lib/exam/version.rb +3 -0
  75. data/lib/inverter.rb +1 -0
  76. data/lib/inverter/reverse.rb +10 -0
  77. data/lib/inverter/version.rb +3 -0
  78. data/rspec_results.html +339 -0
  79. data/spec/exam_spec.rb +346 -0
  80. data/spec/spec_helper.rb +19 -0
  81. metadata +225 -0
@@ -0,0 +1,323 @@
1
+ <!DOCTYPE html>
2
+
3
+ <html>
4
+ <head>
5
+ <meta charset="UTF-8">
6
+
7
+ <title>class Exam::List - 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
+
69
+
70
+ <!-- Method Quickref -->
71
+ <div id="method-list-section" class="nav-section">
72
+ <h3>Methods</h3>
73
+
74
+ <ul class="link-list" role="directory">
75
+
76
+ <li ><a href="#method-c-new">::new</a>
77
+
78
+ <li ><a href="#method-i-popHead">#popHead</a>
79
+
80
+ <li ><a href="#method-i-push">#push</a>
81
+
82
+ <li ><a href="#method-i-to_s">#to_s</a>
83
+
84
+ </ul>
85
+ </div>
86
+
87
+ </div>
88
+ </nav>
89
+
90
+ <main role="main" aria-labelledby="class-Exam::List">
91
+ <h1 id="class-Exam::List" class="class">
92
+ class Exam::List
93
+ </h1>
94
+
95
+ <section class="description">
96
+
97
+ <p>create a <a href="List.html">List</a></p>
98
+
99
+ </section>
100
+
101
+
102
+
103
+
104
+ <section id="5Buntitled-5D" class="documentation-section">
105
+
106
+
107
+
108
+
109
+
110
+
111
+
112
+ <section class="attribute-method-details" class="method-section">
113
+ <header>
114
+ <h3>Attributes</h3>
115
+ </header>
116
+
117
+
118
+ <div id="attribute-i-head" class="method-detail">
119
+ <div class="method-heading attribute-method-heading">
120
+ <span class="method-name">head</span><span
121
+ class="attribute-access-type">[RW]</span>
122
+ </div>
123
+
124
+ <div class="method-description">
125
+
126
+
127
+
128
+ </div>
129
+ </div>
130
+
131
+ </section>
132
+
133
+
134
+
135
+ <section id="public-class-5Buntitled-5D-method-details" class="method-section">
136
+ <header>
137
+ <h3>Public Class Methods</h3>
138
+ </header>
139
+
140
+
141
+ <div id="method-c-new" class="method-detail ">
142
+
143
+ <div class="method-heading">
144
+ <span class="method-name">new</span><span
145
+ class="method-args">(v)</span>
146
+
147
+ <span class="method-click-advice">click to toggle source</span>
148
+
149
+ </div>
150
+
151
+
152
+ <div class="method-description">
153
+
154
+
155
+
156
+
157
+
158
+
159
+ <div class="method-source-code" id="new-source">
160
+ <pre><span class="ruby-comment"># File lib/exam/list.rb, line 9</span>
161
+ <span class="ruby-keyword">def</span> <span class="ruby-identifier">initialize</span>(<span class="ruby-identifier">v</span>)
162
+ <span class="ruby-keyword">if</span> <span class="ruby-identifier">v</span>.<span class="ruby-identifier">kind_of?</span>(<span class="ruby-constant">Array</span>)
163
+ <span class="ruby-ivar">@head</span> = <span class="ruby-constant">Node</span>.<span class="ruby-identifier">new</span>(<span class="ruby-identifier">v</span>[<span class="ruby-value">0</span>],<span class="ruby-keyword">nil</span>)
164
+ <span class="ruby-identifier">v</span>.<span class="ruby-identifier">shift</span>
165
+ <span class="ruby-identifier">push</span>(<span class="ruby-identifier">v</span>)
166
+ <span class="ruby-keyword">else</span>
167
+ <span class="ruby-ivar">@head</span> = <span class="ruby-constant">Node</span>.<span class="ruby-identifier">new</span>(<span class="ruby-identifier">v</span>, <span class="ruby-keyword">nil</span>)
168
+ <span class="ruby-keyword">end</span>
169
+ <span class="ruby-keyword">end</span></pre>
170
+ </div>
171
+
172
+ </div>
173
+
174
+
175
+
176
+
177
+ </div>
178
+
179
+
180
+ </section>
181
+
182
+ <section id="public-instance-5Buntitled-5D-method-details" class="method-section">
183
+ <header>
184
+ <h3>Public Instance Methods</h3>
185
+ </header>
186
+
187
+
188
+ <div id="method-i-popHead" class="method-detail ">
189
+
190
+ <div class="method-heading">
191
+ <span class="method-name">popHead</span><span
192
+ class="method-args">()</span>
193
+
194
+ <span class="method-click-advice">click to toggle source</span>
195
+
196
+ </div>
197
+
198
+
199
+ <div class="method-description">
200
+
201
+
202
+
203
+
204
+
205
+
206
+ <div class="method-source-code" id="popHead-source">
207
+ <pre><span class="ruby-comment"># File lib/exam/list.rb, line 19</span>
208
+ <span class="ruby-keyword">def</span> <span class="ruby-identifier">popHead</span>
209
+ <span class="ruby-identifier">nodo</span> = <span class="ruby-ivar">@head</span>
210
+ <span class="ruby-ivar">@head</span>=<span class="ruby-ivar">@head</span>[<span class="ruby-value">:next</span>]
211
+ <span class="ruby-keyword">return</span> <span class="ruby-identifier">nodo</span>[<span class="ruby-value">:value</span>]
212
+ <span class="ruby-keyword">end</span></pre>
213
+ </div>
214
+
215
+ </div>
216
+
217
+
218
+
219
+
220
+ </div>
221
+
222
+
223
+ <div id="method-i-push" class="method-detail ">
224
+
225
+ <div class="method-heading">
226
+ <span class="method-name">push</span><span
227
+ class="method-args">(v)</span>
228
+
229
+ <span class="method-click-advice">click to toggle source</span>
230
+
231
+ </div>
232
+
233
+
234
+ <div class="method-description">
235
+
236
+
237
+
238
+
239
+
240
+
241
+ <div class="method-source-code" id="push-source">
242
+ <pre><span class="ruby-comment"># File lib/exam/list.rb, line 25</span>
243
+ <span class="ruby-keyword">def</span> <span class="ruby-identifier">push</span>(<span class="ruby-identifier">v</span>)
244
+ <span class="ruby-identifier">aux</span> = <span class="ruby-ivar">@head</span>
245
+ <span class="ruby-keyword">if</span> <span class="ruby-identifier">v</span>.<span class="ruby-identifier">kind_of?</span>(<span class="ruby-constant">Array</span>)
246
+ <span class="ruby-keyword">for</span> <span class="ruby-identifier">i</span> <span class="ruby-keyword">in</span> <span class="ruby-value">0</span><span class="ruby-operator">..</span><span class="ruby-identifier">v</span>.<span class="ruby-identifier">size</span><span class="ruby-operator">-</span><span class="ruby-value">1</span>
247
+ <span class="ruby-identifier">a</span>=<span class="ruby-identifier">v</span>[<span class="ruby-identifier">i</span>]
248
+ <span class="ruby-keyword">while</span> <span class="ruby-identifier">aux</span>[<span class="ruby-value">:next</span>]<span class="ruby-operator">!=</span><span class="ruby-keyword">nil</span> <span class="ruby-keyword">do</span>
249
+ <span class="ruby-identifier">aux</span>=<span class="ruby-identifier">aux</span>[<span class="ruby-value">:next</span>]
250
+ <span class="ruby-keyword">end</span>
251
+ <span class="ruby-identifier">nuevo_nodo</span>=<span class="ruby-constant">Node</span>.<span class="ruby-identifier">new</span>(<span class="ruby-identifier">a</span>, <span class="ruby-keyword">nil</span>)
252
+ <span class="ruby-identifier">aux</span>[<span class="ruby-value">:next</span>]=<span class="ruby-identifier">nuevo_nodo</span>
253
+ <span class="ruby-keyword">end</span>
254
+ <span class="ruby-keyword">else</span>
255
+ <span class="ruby-keyword">while</span> <span class="ruby-identifier">aux</span>[<span class="ruby-value">:next</span>] <span class="ruby-keyword">do</span>
256
+ <span class="ruby-identifier">aux</span>=<span class="ruby-identifier">aux</span>[<span class="ruby-value">:next</span>]
257
+ <span class="ruby-keyword">end</span>
258
+ <span class="ruby-identifier">nuevo_nodo</span>=<span class="ruby-constant">Node</span>.<span class="ruby-identifier">new</span>(<span class="ruby-identifier">v</span>, <span class="ruby-keyword">nil</span>)
259
+ <span class="ruby-identifier">aux</span>[<span class="ruby-value">:next</span>]=<span class="ruby-identifier">nuevo_nodo</span>
260
+ <span class="ruby-keyword">end</span>
261
+ <span class="ruby-keyword">end</span></pre>
262
+ </div>
263
+
264
+ </div>
265
+
266
+
267
+
268
+
269
+ </div>
270
+
271
+
272
+ <div id="method-i-to_s" class="method-detail ">
273
+
274
+ <div class="method-heading">
275
+ <span class="method-name">to_s</span><span
276
+ class="method-args">()</span>
277
+
278
+ <span class="method-click-advice">click to toggle source</span>
279
+
280
+ </div>
281
+
282
+
283
+ <div class="method-description">
284
+
285
+
286
+
287
+
288
+
289
+
290
+ <div class="method-source-code" id="to_s-source">
291
+ <pre><span class="ruby-comment"># File lib/exam/list.rb, line 45</span>
292
+ <span class="ruby-keyword">def</span> <span class="ruby-identifier">to_s</span>
293
+ <span class="ruby-identifier">aux</span>=<span class="ruby-ivar">@head</span>
294
+ <span class="ruby-identifier">s</span>=<span class="ruby-string">&quot;Lista: &quot;</span>
295
+ <span class="ruby-keyword">while</span> <span class="ruby-identifier">aux</span>[<span class="ruby-value">:next</span>] <span class="ruby-keyword">do</span>
296
+ <span class="ruby-identifier">s</span> = <span class="ruby-identifier">s</span> <span class="ruby-operator">+</span> <span class="ruby-node">&quot;#{aux[:value]}&quot;</span> <span class="ruby-operator">+</span> <span class="ruby-string">&quot; -&gt; &quot;</span>
297
+ <span class="ruby-identifier">aux</span>=<span class="ruby-identifier">aux</span>[<span class="ruby-value">:next</span>]
298
+ <span class="ruby-keyword">end</span>
299
+ <span class="ruby-identifier">s</span> = <span class="ruby-identifier">s</span> <span class="ruby-operator">+</span> <span class="ruby-node">&quot;#{aux[:value]}&quot;</span>
300
+ <span class="ruby-comment">#puts &quot;#{s}&quot;</span>
301
+ <span class="ruby-keyword">end</span></pre>
302
+ </div>
303
+
304
+ </div>
305
+
306
+
307
+
308
+
309
+ </div>
310
+
311
+
312
+ </section>
313
+
314
+ </section>
315
+ </main>
316
+
317
+
318
+ <footer id="validator-badges" role="contentinfo">
319
+ <p><a href="http://validator.w3.org/check/referer">Validate</a>
320
+ <p>Generated by <a href="http://rdoc.rubyforge.org">RDoc</a> 4.1.2.
321
+ <p>Based on <a href="http://deveiate.org/projects/Darkfish-Rdoc/">Darkfish</a> by <a href="http://deveiate.org">Michael Granger</a>.
322
+ </footer>
323
+
@@ -0,0 +1,384 @@
1
+ <!DOCTYPE html>
2
+
3
+ <html>
4
+ <head>
5
+ <meta charset="UTF-8">
6
+
7
+ <title>class Exam::Test - 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-check_ans">#check_ans</a>
94
+
95
+ <li ><a href="#method-i-to_s">#to_s</a>
96
+
97
+ </ul>
98
+ </div>
99
+
100
+ </div>
101
+ </nav>
102
+
103
+ <main role="main" aria-labelledby="class-Exam::Test">
104
+ <h1 id="class-Exam::Test" class="class">
105
+ class Exam::Test
106
+ </h1>
107
+
108
+ <section class="description">
109
+
110
+ <p>create a <a href="Test.html">Test</a></p>
111
+
112
+ </section>
113
+
114
+
115
+
116
+
117
+ <section id="5Buntitled-5D" class="documentation-section">
118
+
119
+
120
+
121
+
122
+
123
+
124
+
125
+ <section class="attribute-method-details" class="method-section">
126
+ <header>
127
+ <h3>Attributes</h3>
128
+ </header>
129
+
130
+
131
+ <div id="attribute-i-correcta" class="method-detail">
132
+ <div class="method-heading attribute-method-heading">
133
+ <span class="method-name">correcta</span><span
134
+ class="attribute-access-type">[RW]</span>
135
+ </div>
136
+
137
+ <div class="method-description">
138
+
139
+
140
+
141
+ </div>
142
+ </div>
143
+
144
+ <div id="attribute-i-nivel" class="method-detail">
145
+ <div class="method-heading attribute-method-heading">
146
+ <span class="method-name">nivel</span><span
147
+ class="attribute-access-type">[RW]</span>
148
+ </div>
149
+
150
+ <div class="method-description">
151
+
152
+
153
+
154
+ </div>
155
+ </div>
156
+
157
+ <div id="attribute-i-pregunta" class="method-detail">
158
+ <div class="method-heading attribute-method-heading">
159
+ <span class="method-name">pregunta</span><span
160
+ class="attribute-access-type">[RW]</span>
161
+ </div>
162
+
163
+ <div class="method-description">
164
+
165
+
166
+
167
+ </div>
168
+ </div>
169
+
170
+ <div id="attribute-i-respuestas" class="method-detail">
171
+ <div class="method-heading attribute-method-heading">
172
+ <span class="method-name">respuestas</span><span
173
+ class="attribute-access-type">[RW]</span>
174
+ </div>
175
+
176
+ <div class="method-description">
177
+
178
+
179
+
180
+ </div>
181
+ </div>
182
+
183
+ </section>
184
+
185
+
186
+
187
+ <section id="public-class-5Buntitled-5D-method-details" class="method-section">
188
+ <header>
189
+ <h3>Public Class Methods</h3>
190
+ </header>
191
+
192
+
193
+ <div id="method-c-new" class="method-detail ">
194
+
195
+ <div class="method-heading">
196
+ <span class="method-name">new</span><span
197
+ class="method-args">(pregunta, correcta, respuestas, nivel=nil)</span>
198
+
199
+ <span class="method-click-advice">click to toggle source</span>
200
+
201
+ </div>
202
+
203
+
204
+ <div class="method-description">
205
+
206
+
207
+
208
+
209
+
210
+
211
+ <div class="method-source-code" id="new-source">
212
+ <pre><span class="ruby-comment"># File lib/exam/test.rb, line 17</span>
213
+ <span class="ruby-keyword">def</span> <span class="ruby-identifier">initialize</span>(<span class="ruby-identifier">pregunta</span>, <span class="ruby-identifier">correcta</span>, <span class="ruby-identifier">respuestas</span>, <span class="ruby-identifier">nivel</span>=<span class="ruby-keyword">nil</span>)
214
+ <span class="ruby-ivar">@pregunta</span> = <span class="ruby-identifier">pregunta</span>
215
+ <span class="ruby-ivar">@correcta</span> = <span class="ruby-identifier">correcta</span>
216
+ <span class="ruby-ivar">@respuestas</span> = <span class="ruby-identifier">respuestas</span>.<span class="ruby-identifier">shuffle</span>
217
+ <span class="ruby-ivar">@nivel</span> = <span class="ruby-identifier">nivel</span>
218
+ <span class="ruby-keyword">end</span></pre>
219
+ </div>
220
+
221
+ </div>
222
+
223
+
224
+
225
+
226
+ </div>
227
+
228
+
229
+ </section>
230
+
231
+ <section id="public-instance-5Buntitled-5D-method-details" class="method-section">
232
+ <header>
233
+ <h3>Public Instance Methods</h3>
234
+ </header>
235
+
236
+
237
+ <div id="method-i-3C-3D-3E" class="method-detail ">
238
+
239
+ <div class="method-heading">
240
+ <span class="method-name">&lt;=&gt;</span><span
241
+ class="method-args">(a)</span>
242
+
243
+ <span class="method-click-advice">click to toggle source</span>
244
+
245
+ </div>
246
+
247
+
248
+ <div class="method-description">
249
+
250
+
251
+
252
+
253
+
254
+
255
+ <div class="method-source-code" id="3C-3D-3E-source">
256
+ <pre><span class="ruby-comment"># File lib/exam/test.rb, line 9</span>
257
+ <span class="ruby-keyword">def</span> <span class="ruby-operator">&lt;=&gt;</span> (<span class="ruby-identifier">a</span>)
258
+ <span class="ruby-ivar">@nivel</span> <span class="ruby-operator">&lt;=&gt;</span> <span class="ruby-identifier">a</span>.<span class="ruby-identifier">nivel</span>
259
+ <span class="ruby-keyword">end</span></pre>
260
+ </div>
261
+
262
+ </div>
263
+
264
+
265
+
266
+
267
+ </div>
268
+
269
+
270
+ <div id="method-i-3D-3D" class="method-detail ">
271
+
272
+ <div class="method-heading">
273
+ <span class="method-name">==</span><span
274
+ class="method-args">(a)</span>
275
+
276
+ <span class="method-click-advice">click to toggle source</span>
277
+
278
+ </div>
279
+
280
+
281
+ <div class="method-description">
282
+
283
+
284
+
285
+
286
+
287
+
288
+ <div class="method-source-code" id="3D-3D-source">
289
+ <pre><span class="ruby-comment"># File lib/exam/test.rb, line 13</span>
290
+ <span class="ruby-keyword">def</span> <span class="ruby-operator">==</span> (<span class="ruby-identifier">a</span>)
291
+ <span class="ruby-ivar">@pregunta</span><span class="ruby-operator">==</span><span class="ruby-identifier">a</span>.<span class="ruby-identifier">pregunta</span> <span class="ruby-operator">&amp;&amp;</span> <span class="ruby-ivar">@correcta</span><span class="ruby-operator">==</span><span class="ruby-identifier">a</span>.<span class="ruby-identifier">correcta</span> <span class="ruby-operator">&amp;&amp;</span> <span class="ruby-ivar">@respuestas</span>.<span class="ruby-identifier">should</span> <span class="ruby-operator">=~</span> <span class="ruby-identifier">a</span>.<span class="ruby-identifier">respuestas</span>
292
+ <span class="ruby-keyword">end</span></pre>
293
+ </div>
294
+
295
+ </div>
296
+
297
+
298
+
299
+
300
+ </div>
301
+
302
+
303
+ <div id="method-i-check_ans" class="method-detail ">
304
+
305
+ <div class="method-heading">
306
+ <span class="method-name">check_ans</span><span
307
+ class="method-args">(c)</span>
308
+
309
+ <span class="method-click-advice">click to toggle source</span>
310
+
311
+ </div>
312
+
313
+
314
+ <div class="method-description">
315
+
316
+
317
+
318
+
319
+
320
+
321
+ <div class="method-source-code" id="check_ans-source">
322
+ <pre><span class="ruby-comment"># File lib/exam/test.rb, line 24</span>
323
+ <span class="ruby-keyword">def</span> <span class="ruby-identifier">check_ans</span>(<span class="ruby-identifier">c</span>)
324
+ <span class="ruby-keyword">return</span> (<span class="ruby-identifier">c</span> <span class="ruby-operator">==</span> <span class="ruby-ivar">@correcta</span>)
325
+ <span class="ruby-keyword">end</span></pre>
326
+ </div>
327
+
328
+ </div>
329
+
330
+
331
+
332
+
333
+ </div>
334
+
335
+
336
+ <div id="method-i-to_s" class="method-detail ">
337
+
338
+ <div class="method-heading">
339
+ <span class="method-name">to_s</span><span
340
+ class="method-args">()</span>
341
+
342
+ <span class="method-click-advice">click to toggle source</span>
343
+
344
+ </div>
345
+
346
+
347
+ <div class="method-description">
348
+
349
+
350
+
351
+
352
+
353
+
354
+ <div class="method-source-code" id="to_s-source">
355
+ <pre><span class="ruby-comment"># File lib/exam/test.rb, line 28</span>
356
+ <span class="ruby-keyword">def</span> <span class="ruby-identifier">to_s</span>
357
+ <span class="ruby-identifier">texto</span> = <span class="ruby-node">&quot;Pregunta: #{@pregunta} \n&quot;</span>
358
+ <span class="ruby-keyword">for</span> <span class="ruby-identifier">i</span> <span class="ruby-keyword">in</span> <span class="ruby-value">0</span><span class="ruby-operator">..</span><span class="ruby-ivar">@respuestas</span>.<span class="ruby-identifier">size</span><span class="ruby-operator">-</span><span class="ruby-value">1</span>
359
+ <span class="ruby-identifier">texto</span> = <span class="ruby-identifier">texto</span> <span class="ruby-operator">+</span> <span class="ruby-node">&quot;\t #{i+1}) #{@respuestas[i]} \n&quot;</span>
360
+ <span class="ruby-keyword">end</span>
361
+ <span class="ruby-keyword">return</span> <span class="ruby-identifier">texto</span>
362
+ <span class="ruby-keyword">end</span></pre>
363
+ </div>
364
+
365
+ </div>
366
+
367
+
368
+
369
+
370
+ </div>
371
+
372
+
373
+ </section>
374
+
375
+ </section>
376
+ </main>
377
+
378
+
379
+ <footer id="validator-badges" role="contentinfo">
380
+ <p><a href="http://validator.w3.org/check/referer">Validate</a>
381
+ <p>Generated by <a href="http://rdoc.rubyforge.org">RDoc</a> 4.1.2.
382
+ <p>Based on <a href="http://deveiate.org/projects/Darkfish-Rdoc/">Darkfish</a> by <a href="http://deveiate.org">Michael Granger</a>.
383
+ </footer>
384
+