examLPP 0.1.1

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 (83) hide show
  1. checksums.yaml +7 -0
  2. data/.coveralls.yml +1 -0
  3. data/.gitignore +5 -0
  4. data/.rspec +2 -0
  5. data/.travis.yml +4 -0
  6. data/Gemfile +5 -0
  7. data/Guardfile +70 -0
  8. data/LICENSE.txt +22 -0
  9. data/README.md +19 -0
  10. data/Rakefile +6 -0
  11. data/coverage/.last_run.json +5 -0
  12. data/coverage/.resultset.json +714 -0
  13. data/doc/Exam.html +112 -0
  14. data/doc/Examen.html +319 -0
  15. data/doc/Gemfile.html +101 -0
  16. data/doc/Gemfile_lock.html +186 -0
  17. data/doc/Guardfile.html +169 -0
  18. data/doc/LICENSE_txt.html +116 -0
  19. data/doc/Lista.html +472 -0
  20. data/doc/Nodo.html +264 -0
  21. data/doc/Object.html +119 -0
  22. data/doc/Pregunta.html +346 -0
  23. data/doc/PreguntaS.html +338 -0
  24. data/doc/PreguntaVF.html +210 -0
  25. data/doc/README_md.html +120 -0
  26. data/doc/Rakefile.html +99 -0
  27. data/doc/created.rid +18 -0
  28. data/doc/exam_gemspec.html +127 -0
  29. data/doc/fonts.css +167 -0
  30. data/doc/fonts/Lato-Light.ttf +0 -0
  31. data/doc/fonts/Lato-LightItalic.ttf +0 -0
  32. data/doc/fonts/Lato-Regular.ttf +0 -0
  33. data/doc/fonts/Lato-RegularItalic.ttf +0 -0
  34. data/doc/fonts/SourceCodePro-Bold.ttf +0 -0
  35. data/doc/fonts/SourceCodePro-Regular.ttf +0 -0
  36. data/doc/images/add.png +0 -0
  37. data/doc/images/arrow_up.png +0 -0
  38. data/doc/images/brick.png +0 -0
  39. data/doc/images/brick_link.png +0 -0
  40. data/doc/images/bug.png +0 -0
  41. data/doc/images/bullet_black.png +0 -0
  42. data/doc/images/bullet_toggle_minus.png +0 -0
  43. data/doc/images/bullet_toggle_plus.png +0 -0
  44. data/doc/images/date.png +0 -0
  45. data/doc/images/delete.png +0 -0
  46. data/doc/images/find.png +0 -0
  47. data/doc/images/loadingAnimation.gif +0 -0
  48. data/doc/images/macFFBgHack.png +0 -0
  49. data/doc/images/package.png +0 -0
  50. data/doc/images/page_green.png +0 -0
  51. data/doc/images/page_white_text.png +0 -0
  52. data/doc/images/page_white_width.png +0 -0
  53. data/doc/images/plugin.png +0 -0
  54. data/doc/images/ruby.png +0 -0
  55. data/doc/images/tag_blue.png +0 -0
  56. data/doc/images/tag_green.png +0 -0
  57. data/doc/images/transparent.png +0 -0
  58. data/doc/images/wrench.png +0 -0
  59. data/doc/images/wrench_orange.png +0 -0
  60. data/doc/images/zoom.png +0 -0
  61. data/doc/index.html +118 -0
  62. data/doc/js/darkfish.js +140 -0
  63. data/doc/js/jquery.js +18 -0
  64. data/doc/js/navigation.js +142 -0
  65. data/doc/js/search.js +109 -0
  66. data/doc/js/search_index.js +1 -0
  67. data/doc/js/searcher.js +228 -0
  68. data/doc/rdoc.css +580 -0
  69. data/doc/table_of_contents.html +222 -0
  70. data/exam.gemspec +32 -0
  71. data/lib/exam.rb +12 -0
  72. data/lib/exam/examen.rb +69 -0
  73. data/lib/exam/lista.rb +109 -0
  74. data/lib/exam/nodo.rb +14 -0
  75. data/lib/exam/pregunta.rb +38 -0
  76. data/lib/exam/preguntaMadre.rb +47 -0
  77. data/lib/exam/preguntaVF.rb +19 -0
  78. data/lib/exam/quiz.rb +44 -0
  79. data/lib/exam/version.rb +3 -0
  80. data/pkg/exam-0.0.1.gem +0 -0
  81. data/spec/exam_spec.rb +353 -0
  82. data/spec/spec_helper.rb +22 -0
  83. metadata +226 -0
data/doc/Nodo.html ADDED
@@ -0,0 +1,264 @@
1
+ <!DOCTYPE html>
2
+
3
+ <html>
4
+ <head>
5
+ <meta charset="UTF-8">
6
+
7
+ <title>class Nodo - 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
+ </ul>
92
+ </div>
93
+
94
+ </div>
95
+ </nav>
96
+
97
+ <main role="main" aria-labelledby="class-Nodo">
98
+ <h1 id="class-Nodo" class="class">
99
+ class Nodo
100
+ </h1>
101
+
102
+ <section class="description">
103
+
104
+ <p><a href="Nodo.html">Nodo</a> como objeto comparable y ordenable (se mira el
105
+ valor que contiene)</p>
106
+
107
+ <p>(!) Actualmente en desuso!</p>
108
+
109
+ </section>
110
+
111
+
112
+
113
+
114
+ <section id="5Buntitled-5D" class="documentation-section">
115
+
116
+
117
+
118
+
119
+
120
+
121
+
122
+ <section class="attribute-method-details" class="method-section">
123
+ <header>
124
+ <h3>Attributes</h3>
125
+ </header>
126
+
127
+
128
+ <div id="attribute-i-id" class="method-detail">
129
+ <div class="method-heading attribute-method-heading">
130
+ <span class="method-name">id</span><span
131
+ class="attribute-access-type">[R]</span>
132
+ </div>
133
+
134
+ <div class="method-description">
135
+
136
+
137
+
138
+ </div>
139
+ </div>
140
+
141
+ <div id="attribute-i-next" class="method-detail">
142
+ <div class="method-heading attribute-method-heading">
143
+ <span class="method-name">next</span><span
144
+ class="attribute-access-type">[RW]</span>
145
+ </div>
146
+
147
+ <div class="method-description">
148
+
149
+
150
+
151
+ </div>
152
+ </div>
153
+
154
+ <div id="attribute-i-valor" class="method-detail">
155
+ <div class="method-heading attribute-method-heading">
156
+ <span class="method-name">valor</span><span
157
+ class="attribute-access-type">[R]</span>
158
+ </div>
159
+
160
+ <div class="method-description">
161
+
162
+
163
+
164
+ </div>
165
+ </div>
166
+
167
+ </section>
168
+
169
+
170
+
171
+ <section id="public-class-5Buntitled-5D-method-details" class="method-section">
172
+ <header>
173
+ <h3>Public Class Methods</h3>
174
+ </header>
175
+
176
+
177
+ <div id="method-c-new" class="method-detail ">
178
+
179
+ <div class="method-heading">
180
+ <span class="method-name">new</span><span
181
+ class="method-args">(valor)</span>
182
+
183
+ <span class="method-click-advice">click to toggle source</span>
184
+
185
+ </div>
186
+
187
+
188
+ <div class="method-description">
189
+
190
+ <p>Constructor</p>
191
+
192
+
193
+
194
+
195
+ <div class="method-source-code" id="new-source">
196
+ <pre><span class="ruby-comment"># File lib/exam/nodo.rb, line 8</span>
197
+ <span class="ruby-keyword">def</span> <span class="ruby-identifier">initialize</span>(<span class="ruby-identifier">valor</span>)
198
+ <span class="ruby-ivar">@valor</span> = <span class="ruby-identifier">valor</span>
199
+ <span class="ruby-ivar">@id</span> = <span class="ruby-identifier">object_id</span> <span class="ruby-comment">#identificador univoco</span>
200
+ <span class="ruby-ivar">@next</span> = <span class="ruby-keyword">nil</span>
201
+ <span class="ruby-keyword">end</span></pre>
202
+ </div>
203
+
204
+ </div>
205
+
206
+
207
+
208
+
209
+ </div>
210
+
211
+
212
+ </section>
213
+
214
+ <section id="public-instance-5Buntitled-5D-method-details" class="method-section">
215
+ <header>
216
+ <h3>Public Instance Methods</h3>
217
+ </header>
218
+
219
+
220
+ <div id="method-i-3C-3D-3E" class="method-detail ">
221
+
222
+ <div class="method-heading">
223
+ <span class="method-name">&lt;=&gt;</span><span
224
+ class="method-args">(other)</span>
225
+
226
+ <span class="method-click-advice">click to toggle source</span>
227
+
228
+ </div>
229
+
230
+
231
+ <div class="method-description">
232
+
233
+
234
+
235
+
236
+
237
+
238
+ <div class="method-source-code" id="3C-3D-3E-source">
239
+ <pre><span class="ruby-comment"># File lib/exam/lista.rb, line 9</span>
240
+ <span class="ruby-keyword">def</span> <span class="ruby-operator">&lt;=&gt;</span> (<span class="ruby-identifier">other</span>)
241
+ <span class="ruby-identifier">value</span> <span class="ruby-operator">&lt;=&gt;</span> <span class="ruby-identifier">other</span>.<span class="ruby-identifier">value</span>
242
+ <span class="ruby-keyword">end</span></pre>
243
+ </div>
244
+
245
+ </div>
246
+
247
+
248
+
249
+
250
+ </div>
251
+
252
+
253
+ </section>
254
+
255
+ </section>
256
+ </main>
257
+
258
+
259
+ <footer id="validator-badges" role="contentinfo">
260
+ <p><a href="http://validator.w3.org/check/referer">Validate</a>
261
+ <p>Generated by <a href="http://rdoc.rubyforge.org">RDoc</a> 4.1.0.
262
+ <p>Based on <a href="http://deveiate.org/projects/Darkfish-Rdoc/">Darkfish</a> by <a href="http://deveiate.org">Michael Granger</a>.
263
+ </footer>
264
+
data/doc/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><p>Definicion de nodo como un Struct</p>
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
+
data/doc/Pregunta.html ADDED
@@ -0,0 +1,346 @@
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-resp_correcta-3F">#resp_correcta?</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 base de las preguntas. No contiene respuestas.</p>
109
+
110
+ </section>
111
+
112
+
113
+
114
+
115
+ <section id="5Buntitled-5D" class="documentation-section">
116
+
117
+
118
+
119
+
120
+
121
+
122
+
123
+ <section class="attribute-method-details" class="method-section">
124
+ <header>
125
+ <h3>Attributes</h3>
126
+ </header>
127
+
128
+
129
+ <div id="attribute-i-correcta" class="method-detail">
130
+ <div class="method-heading attribute-method-heading">
131
+ <span class="method-name">correcta</span><span
132
+ class="attribute-access-type">[RW]</span>
133
+ </div>
134
+
135
+ <div class="method-description">
136
+
137
+
138
+
139
+ </div>
140
+ </div>
141
+
142
+ <div id="attribute-i-df" class="method-detail">
143
+ <div class="method-heading attribute-method-heading">
144
+ <span class="method-name">df</span><span
145
+ class="attribute-access-type">[R]</span>
146
+ </div>
147
+
148
+ <div class="method-description">
149
+
150
+
151
+
152
+ </div>
153
+ </div>
154
+
155
+ <div id="attribute-i-pr" class="method-detail">
156
+ <div class="method-heading attribute-method-heading">
157
+ <span class="method-name">pr</span><span
158
+ class="attribute-access-type">[R]</span>
159
+ </div>
160
+
161
+ <div class="method-description">
162
+
163
+
164
+
165
+ </div>
166
+ </div>
167
+
168
+ </section>
169
+
170
+
171
+
172
+ <section id="public-class-5Buntitled-5D-method-details" class="method-section">
173
+ <header>
174
+ <h3>Public Class Methods</h3>
175
+ </header>
176
+
177
+
178
+ <div id="method-c-new" class="method-detail ">
179
+
180
+ <div class="method-heading">
181
+ <span class="method-name">new</span><span
182
+ class="method-args">(pregunta, dificultad)</span>
183
+
184
+ <span class="method-click-advice">click to toggle source</span>
185
+
186
+ </div>
187
+
188
+
189
+ <div class="method-description">
190
+
191
+ <p>Método constructor</p>
192
+
193
+
194
+
195
+
196
+ <div class="method-source-code" id="new-source">
197
+ <pre><span class="ruby-comment"># File lib/exam/preguntaMadre.rb, line 10</span>
198
+ <span class="ruby-keyword">def</span> <span class="ruby-identifier">initialize</span>(<span class="ruby-identifier">pregunta</span>, <span class="ruby-identifier">dificultad</span>)
199
+ <span class="ruby-ivar">@pr</span> = <span class="ruby-identifier">pregunta</span>
200
+ <span class="ruby-ivar">@df</span> = <span class="ruby-identifier">dificultad</span>
201
+ <span class="ruby-ivar">@correcta</span> = <span class="ruby-keyword">nil</span> <span class="ruby-comment">#debe modificarse; int que refiere a pos en Array de pr. </span>
202
+ <span class="ruby-keyword">end</span></pre>
203
+ </div>
204
+
205
+ </div>
206
+
207
+
208
+
209
+
210
+ </div>
211
+
212
+
213
+ </section>
214
+
215
+ <section id="public-instance-5Buntitled-5D-method-details" class="method-section">
216
+ <header>
217
+ <h3>Public Instance Methods</h3>
218
+ </header>
219
+
220
+
221
+ <div id="method-i-3C-3D-3E" class="method-detail ">
222
+
223
+ <div class="method-heading">
224
+ <span class="method-name">&lt;=&gt;</span><span
225
+ class="method-args">(other)</span>
226
+
227
+ <span class="method-click-advice">click to toggle source</span>
228
+
229
+ </div>
230
+
231
+
232
+ <div class="method-description">
233
+
234
+ <p>Método de comparación (se fija en la dificultad)</p>
235
+
236
+
237
+
238
+
239
+ <div class="method-source-code" id="3C-3D-3E-source">
240
+ <pre><span class="ruby-comment"># File lib/exam/preguntaMadre.rb, line 17</span>
241
+ <span class="ruby-keyword">def</span> <span class="ruby-operator">&lt;=&gt;</span> (<span class="ruby-identifier">other</span>)
242
+ <span class="ruby-ivar">@df</span> <span class="ruby-operator">&lt;=&gt;</span> <span class="ruby-identifier">other</span>.<span class="ruby-identifier">df</span>
243
+ <span class="ruby-keyword">end</span></pre>
244
+ </div>
245
+
246
+ </div>
247
+
248
+
249
+
250
+
251
+ </div>
252
+
253
+
254
+ <div id="method-i-3D-3D" class="method-detail ">
255
+
256
+ <div class="method-heading">
257
+ <span class="method-name">==</span><span
258
+ class="method-args">(other)</span>
259
+
260
+ <span class="method-click-advice">click to toggle source</span>
261
+
262
+ </div>
263
+
264
+
265
+ <div class="method-description">
266
+
267
+ <p>Evitamos que se consideren iguales dos preguntas cualquiera sólo porque
268
+ tengan la misma dificultad. Esto es una sobrecarga del método de
269
+ comparación.</p>
270
+
271
+
272
+
273
+
274
+ <div class="method-source-code" id="3D-3D-source">
275
+ <pre><span class="ruby-comment"># File lib/exam/preguntaMadre.rb, line 24</span>
276
+ <span class="ruby-keyword">def</span> <span class="ruby-operator">==</span> (<span class="ruby-identifier">other</span>)
277
+ <span class="ruby-ivar">@pr</span> <span class="ruby-operator">==</span> <span class="ruby-identifier">other</span>.<span class="ruby-identifier">pr</span> <span class="ruby-operator">&amp;&amp;</span> <span class="ruby-ivar">@df</span> <span class="ruby-operator">==</span> <span class="ruby-identifier">other</span>.<span class="ruby-identifier">df</span>
278
+ <span class="ruby-keyword">end</span></pre>
279
+ </div>
280
+
281
+ </div>
282
+
283
+
284
+
285
+
286
+ </div>
287
+
288
+
289
+ <div id="method-i-resp_correcta-3F" class="method-detail ">
290
+
291
+ <div class="method-heading">
292
+ <span class="method-name">resp_correcta?</span><span
293
+ class="method-args">(resp)</span>
294
+
295
+ <span class="method-click-advice">click to toggle source</span>
296
+
297
+ </div>
298
+
299
+
300
+ <div class="method-description">
301
+
302
+ <p>Método que contrasta la respuesta entregada (por parámetro) con el atributo
303
+ que señala la respuesta correcta.</p>
304
+
305
+
306
+
307
+
308
+ <div class="method-source-code" id="resp_correcta-3F-source">
309
+ <pre><span class="ruby-comment"># File lib/exam/preguntaMadre.rb, line 30</span>
310
+ <span class="ruby-keyword">def</span> <span class="ruby-identifier">resp_correcta?</span>(<span class="ruby-identifier">resp</span>)
311
+ <span class="ruby-keyword">if</span> <span class="ruby-identifier">resp</span>.<span class="ruby-identifier">to_i</span> <span class="ruby-operator">!=</span> <span class="ruby-value">0</span>
312
+ <span class="ruby-comment">#sera numero, lo pasamos a int.</span>
313
+ <span class="ruby-identifier">resp</span> = <span class="ruby-identifier">resp</span>.<span class="ruby-identifier">to_i</span>
314
+ <span class="ruby-keyword">else</span>
315
+ <span class="ruby-comment">#sera String, admitimos mayus y minus.</span>
316
+ <span class="ruby-identifier">resp</span>.<span class="ruby-identifier">upcase!</span>
317
+ <span class="ruby-keyword">end</span>
318
+
319
+ <span class="ruby-keyword">if</span> <span class="ruby-identifier">resp</span> <span class="ruby-operator">==</span> <span class="ruby-ivar">@correcta</span>
320
+ <span class="ruby-keyword">true</span>
321
+ <span class="ruby-keyword">else</span>
322
+ <span class="ruby-keyword">false</span>
323
+ <span class="ruby-keyword">end</span>
324
+ <span class="ruby-keyword">end</span></pre>
325
+ </div>
326
+
327
+ </div>
328
+
329
+
330
+
331
+
332
+ </div>
333
+
334
+
335
+ </section>
336
+
337
+ </section>
338
+ </main>
339
+
340
+
341
+ <footer id="validator-badges" role="contentinfo">
342
+ <p><a href="http://validator.w3.org/check/referer">Validate</a>
343
+ <p>Generated by <a href="http://rdoc.rubyforge.org">RDoc</a> 4.1.0.
344
+ <p>Based on <a href="http://deveiate.org/projects/Darkfish-Rdoc/">Darkfish</a> by <a href="http://deveiate.org">Michael Granger</a>.
345
+ </footer>
346
+