estefania_exam 0.0.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 (77) hide show
  1. checksums.yaml +7 -0
  2. data/.coveralls.yml +1 -0
  3. data/.gitignore +15 -0
  4. data/.rspec +2 -0
  5. data/.travis.yml +4 -0
  6. data/Gemfile +4 -0
  7. data/Guardfile +39 -0
  8. data/LICENSE.txt +22 -0
  9. data/README.md +12 -0
  10. data/Rakefile +14 -0
  11. data/exam.gemspec +28 -0
  12. data/lib/doc/Exam.html +114 -0
  13. data/lib/doc/Exam/Examen.html +350 -0
  14. data/lib/doc/Interfaz.html +285 -0
  15. data/lib/doc/List.html +453 -0
  16. data/lib/doc/Node.html +170 -0
  17. data/lib/doc/Object.html +121 -0
  18. data/lib/doc/Question.html +309 -0
  19. data/lib/doc/SimpleSelection.html +275 -0
  20. data/lib/doc/VerdaderoFalso.html +228 -0
  21. data/lib/doc/created.rid +9 -0
  22. data/lib/doc/fonts.css +167 -0
  23. data/lib/doc/fonts/Lato-Light.ttf +0 -0
  24. data/lib/doc/fonts/Lato-LightItalic.ttf +0 -0
  25. data/lib/doc/fonts/Lato-Regular.ttf +0 -0
  26. data/lib/doc/fonts/Lato-RegularItalic.ttf +0 -0
  27. data/lib/doc/fonts/SourceCodePro-Bold.ttf +0 -0
  28. data/lib/doc/fonts/SourceCodePro-Regular.ttf +0 -0
  29. data/lib/doc/images/add.png +0 -0
  30. data/lib/doc/images/arrow_up.png +0 -0
  31. data/lib/doc/images/brick.png +0 -0
  32. data/lib/doc/images/brick_link.png +0 -0
  33. data/lib/doc/images/bug.png +0 -0
  34. data/lib/doc/images/bullet_black.png +0 -0
  35. data/lib/doc/images/bullet_toggle_minus.png +0 -0
  36. data/lib/doc/images/bullet_toggle_plus.png +0 -0
  37. data/lib/doc/images/date.png +0 -0
  38. data/lib/doc/images/delete.png +0 -0
  39. data/lib/doc/images/find.png +0 -0
  40. data/lib/doc/images/loadingAnimation.gif +0 -0
  41. data/lib/doc/images/macFFBgHack.png +0 -0
  42. data/lib/doc/images/package.png +0 -0
  43. data/lib/doc/images/page_green.png +0 -0
  44. data/lib/doc/images/page_white_text.png +0 -0
  45. data/lib/doc/images/page_white_width.png +0 -0
  46. data/lib/doc/images/plugin.png +0 -0
  47. data/lib/doc/images/ruby.png +0 -0
  48. data/lib/doc/images/tag_blue.png +0 -0
  49. data/lib/doc/images/tag_green.png +0 -0
  50. data/lib/doc/images/transparent.png +0 -0
  51. data/lib/doc/images/wrench.png +0 -0
  52. data/lib/doc/images/wrench_orange.png +0 -0
  53. data/lib/doc/images/zoom.png +0 -0
  54. data/lib/doc/index.html +99 -0
  55. data/lib/doc/js/darkfish.js +140 -0
  56. data/lib/doc/js/jquery.js +4 -0
  57. data/lib/doc/js/navigation.js +142 -0
  58. data/lib/doc/js/search.js +109 -0
  59. data/lib/doc/js/search_index.js +1 -0
  60. data/lib/doc/js/searcher.js +228 -0
  61. data/lib/doc/rdoc.css +580 -0
  62. data/lib/doc/table_of_contents.html +186 -0
  63. data/lib/exam.rb +46 -0
  64. data/lib/exam/interfaz.rb +49 -0
  65. data/lib/exam/list.rb +111 -0
  66. data/lib/exam/node.rb +5 -0
  67. data/lib/exam/question.rb +34 -0
  68. data/lib/exam/simpleSelection.rb +29 -0
  69. data/lib/exam/verdaderoFalso.rb +21 -0
  70. data/lib/exam/version.rb +3 -0
  71. data/lib/quiz.rb +61 -0
  72. data/lib/quiz/answer.rb +25 -0
  73. data/lib/quiz/question.rb +29 -0
  74. data/spec/exam_spec.rb +297 -0
  75. data/spec/quiz_spec.rb +55 -0
  76. data/spec/spec_helper.rb +19 -0
  77. metadata +221 -0
@@ -0,0 +1,275 @@
1
+ <!DOCTYPE html>
2
+
3
+ <html>
4
+ <head>
5
+ <meta charset="utf-8">
6
+
7
+ <title>class SimpleSelection - 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="Question.html">Question</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 class="calls-super" ><a href="#method-c-new">::new</a>
77
+
78
+ <li ><a href="#method-i-answers_to_s">#answers_to_s</a>
79
+
80
+ <li ><a href="#method-i-to_s">#to_s</a>
81
+
82
+ </ul>
83
+ </div>
84
+
85
+ </div>
86
+ </nav>
87
+
88
+ <main role="main" aria-labelledby="class-SimpleSelection">
89
+ <h1 id="class-SimpleSelection" class="class">
90
+ class SimpleSelection
91
+ </h1>
92
+
93
+ <section class="description">
94
+
95
+ <p>Clase que hereda de <a href="Question.html">Question</a> y que permitirá
96
+ crear preguntas con muchas opciones de respuesta.</p>
97
+
98
+ </section>
99
+
100
+
101
+
102
+
103
+ <section id="5Buntitled-5D" class="documentation-section">
104
+
105
+
106
+
107
+
108
+
109
+
110
+
111
+ <section class="attribute-method-details" class="method-section">
112
+ <header>
113
+ <h3>Attributes</h3>
114
+ </header>
115
+
116
+
117
+ <div id="attribute-i-answers" class="method-detail">
118
+ <div class="method-heading attribute-method-heading">
119
+ <span class="method-name">answers</span><span
120
+ class="attribute-access-type">[R]</span>
121
+ </div>
122
+
123
+ <div class="method-description">
124
+
125
+ <p>Atributo que almacenará las opciones de respuesta para la pregunta.</p>
126
+
127
+ </div>
128
+ </div>
129
+
130
+ </section>
131
+
132
+
133
+
134
+ <section id="public-class-5Buntitled-5D-method-details" class="method-section">
135
+ <header>
136
+ <h3>Public Class Methods</h3>
137
+ </header>
138
+
139
+
140
+ <div id="method-c-new" class="method-detail ">
141
+
142
+ <div class="method-heading">
143
+ <span class="method-name">new</span><span
144
+ class="method-args">(ask, answers,respuestaCorrecta,difficulty=0)</span>
145
+
146
+ <span class="method-click-advice">click to toggle source</span>
147
+
148
+ </div>
149
+
150
+
151
+ <div class="method-description">
152
+
153
+ <p>Inicialización de las variables ask, answers, respuestaCorrecta y
154
+ difficulty. Ésta última con valor por defecto a 0. Para inicializar se
155
+ llamará al método super que mandará la información al constructor de la
156
+ clase madre (Question).</p>
157
+
158
+
159
+ <div class="method-calls-super">
160
+ Calls superclass method
161
+ <a href="Question.html#method-c-new">Question.new</a>
162
+ </div>
163
+
164
+
165
+
166
+ <div class="method-source-code" id="new-source">
167
+ <pre><span class="ruby-comment"># File exam/simpleSelection.rb, line 11</span>
168
+ <span class="ruby-keyword">def</span> <span class="ruby-identifier">initialize</span>(<span class="ruby-identifier">ask</span>, <span class="ruby-identifier">answers</span>,<span class="ruby-identifier">respuestaCorrecta</span>,<span class="ruby-identifier">difficulty</span>=<span class="ruby-value">0</span>)
169
+ <span class="ruby-keyword">super</span>(<span class="ruby-identifier">ask</span>,<span class="ruby-identifier">respuestaCorrecta</span>,<span class="ruby-identifier">difficulty</span>)
170
+ <span class="ruby-ivar">@answers</span> = <span class="ruby-identifier">answers</span>
171
+ <span class="ruby-keyword">end</span></pre>
172
+ </div>
173
+
174
+ </div>
175
+
176
+
177
+
178
+
179
+ </div>
180
+
181
+
182
+ </section>
183
+
184
+ <section id="public-instance-5Buntitled-5D-method-details" class="method-section">
185
+ <header>
186
+ <h3>Public Instance Methods</h3>
187
+ </header>
188
+
189
+
190
+ <div id="method-i-answers_to_s" class="method-detail ">
191
+
192
+ <div class="method-heading">
193
+ <span class="method-name">answers_to_s</span><span
194
+ class="method-args">()</span>
195
+
196
+ <span class="method-click-advice">click to toggle source</span>
197
+
198
+ </div>
199
+
200
+
201
+ <div class="method-description">
202
+
203
+ <p>Método que devuelve una cadena con las opciones de respuesta de la
204
+ pregunta.</p>
205
+
206
+
207
+
208
+
209
+ <div class="method-source-code" id="answers_to_s-source">
210
+ <pre><span class="ruby-comment"># File exam/simpleSelection.rb, line 16</span>
211
+ <span class="ruby-keyword">def</span> <span class="ruby-identifier">answers_to_s</span>
212
+ <span class="ruby-identifier">cadena</span> = <span class="ruby-string">&quot;&quot;</span>
213
+ <span class="ruby-ivar">@answers</span>.<span class="ruby-identifier">each</span> <span class="ruby-keyword">do</span> <span class="ruby-operator">|</span><span class="ruby-identifier">m</span>,<span class="ruby-identifier">i</span><span class="ruby-operator">|</span>
214
+ <span class="ruby-identifier">cadena</span> <span class="ruby-operator">+=</span> <span class="ruby-node">&quot;#{m})#{i}\n&quot;</span>
215
+ <span class="ruby-keyword">end</span>
216
+ <span class="ruby-identifier">cadena</span>
217
+ <span class="ruby-keyword">end</span></pre>
218
+ </div>
219
+
220
+ </div>
221
+
222
+
223
+
224
+
225
+ </div>
226
+
227
+
228
+ <div id="method-i-to_s" class="method-detail ">
229
+
230
+ <div class="method-heading">
231
+ <span class="method-name">to_s</span><span
232
+ class="method-args">()</span>
233
+
234
+ <span class="method-click-advice">click to toggle source</span>
235
+
236
+ </div>
237
+
238
+
239
+ <div class="method-description">
240
+
241
+ <p>Método que devuelve una cadena con el enunciado y las opciones de respuesta
242
+ de la pregunta.</p>
243
+
244
+
245
+
246
+
247
+ <div class="method-source-code" id="to_s-source">
248
+ <pre><span class="ruby-comment"># File exam/simpleSelection.rb, line 24</span>
249
+ <span class="ruby-keyword">def</span> <span class="ruby-identifier">to_s</span>
250
+ <span class="ruby-identifier">cadena</span> = <span class="ruby-node">&quot;#{@ask}\n&quot;</span>
251
+ <span class="ruby-identifier">cadena</span> <span class="ruby-operator">+=</span><span class="ruby-keyword">self</span>.<span class="ruby-identifier">answers_to_s</span>
252
+ <span class="ruby-identifier">cadena</span>
253
+ <span class="ruby-keyword">end</span></pre>
254
+ </div>
255
+
256
+ </div>
257
+
258
+
259
+
260
+
261
+ </div>
262
+
263
+
264
+ </section>
265
+
266
+ </section>
267
+ </main>
268
+
269
+
270
+ <footer id="validator-badges" role="contentinfo">
271
+ <p><a href="http://validator.w3.org/check/referer">Validate</a>
272
+ <p>Generated by <a href="http://rdoc.rubyforge.org">RDoc</a> 4.1.2.
273
+ <p>Based on <a href="http://deveiate.org/projects/Darkfish-Rdoc/">Darkfish</a> by <a href="http://deveiate.org">Michael Granger</a>.
274
+ </footer>
275
+
@@ -0,0 +1,228 @@
1
+ <!DOCTYPE html>
2
+
3
+ <html>
4
+ <head>
5
+ <meta charset="utf-8">
6
+
7
+ <title>class VerdaderoFalso - 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="Question.html">Question</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 class="calls-super" ><a href="#method-c-new">::new</a>
77
+
78
+ <li ><a href="#method-i-to_s">#to_s</a>
79
+
80
+ </ul>
81
+ </div>
82
+
83
+ </div>
84
+ </nav>
85
+
86
+ <main role="main" aria-labelledby="class-VerdaderoFalso">
87
+ <h1 id="class-VerdaderoFalso" class="class">
88
+ class VerdaderoFalso
89
+ </h1>
90
+
91
+ <section class="description">
92
+
93
+ <p>Clase que hereda de <a href="Question.html">Question</a> y que permite
94
+ crear preguntas del tipo Verdadero o Falso.</p>
95
+
96
+ </section>
97
+
98
+
99
+
100
+
101
+ <section id="5Buntitled-5D" class="documentation-section">
102
+
103
+
104
+
105
+
106
+
107
+ <section class="constants-list">
108
+ <header>
109
+ <h3>Constants</h3>
110
+ </header>
111
+ <dl>
112
+
113
+ <dt id="OPCIONES">OPCIONES
114
+
115
+ <dd><p>Constante que tiene las dos únicas opciones que puede tener este tipo de
116
+ pregunta (Cierto y Falso)</p>
117
+
118
+
119
+ </dl>
120
+ </section>
121
+
122
+
123
+
124
+
125
+
126
+ <section id="public-class-5Buntitled-5D-method-details" class="method-section">
127
+ <header>
128
+ <h3>Public Class Methods</h3>
129
+ </header>
130
+
131
+
132
+ <div id="method-c-new" class="method-detail ">
133
+
134
+ <div class="method-heading">
135
+ <span class="method-name">new</span><span
136
+ class="method-args">(ask,respuestaCorrecta,difficulty=0)</span>
137
+
138
+ <span class="method-click-advice">click to toggle source</span>
139
+
140
+ </div>
141
+
142
+
143
+ <div class="method-description">
144
+
145
+ <p>Inicialización de los atributos mediante una llamada al constructor de la
146
+ clase madre.</p>
147
+
148
+
149
+ <div class="method-calls-super">
150
+ Calls superclass method
151
+ <a href="Question.html#method-c-new">Question.new</a>
152
+ </div>
153
+
154
+
155
+
156
+ <div class="method-source-code" id="new-source">
157
+ <pre><span class="ruby-comment"># File exam/verdaderoFalso.rb, line 9</span>
158
+ <span class="ruby-keyword">def</span> <span class="ruby-identifier">initialize</span> (<span class="ruby-identifier">ask</span>,<span class="ruby-identifier">respuestaCorrecta</span>,<span class="ruby-identifier">difficulty</span>=<span class="ruby-value">0</span>)
159
+ <span class="ruby-keyword">super</span>(<span class="ruby-identifier">ask</span>,<span class="ruby-identifier">respuestaCorrecta</span>,<span class="ruby-identifier">difficulty</span>)
160
+ <span class="ruby-keyword">end</span></pre>
161
+ </div>
162
+
163
+ </div>
164
+
165
+
166
+
167
+
168
+ </div>
169
+
170
+
171
+ </section>
172
+
173
+ <section id="public-instance-5Buntitled-5D-method-details" class="method-section">
174
+ <header>
175
+ <h3>Public Instance Methods</h3>
176
+ </header>
177
+
178
+
179
+ <div id="method-i-to_s" class="method-detail ">
180
+
181
+ <div class="method-heading">
182
+ <span class="method-name">to_s</span><span
183
+ class="method-args">()</span>
184
+
185
+ <span class="method-click-advice">click to toggle source</span>
186
+
187
+ </div>
188
+
189
+
190
+ <div class="method-description">
191
+
192
+ <p>Método que devuelve una cadena con el enunciado y las dos posibles opciones
193
+ de respuesta para la pregunta.</p>
194
+
195
+
196
+
197
+
198
+ <div class="method-source-code" id="to_s-source">
199
+ <pre><span class="ruby-comment"># File exam/verdaderoFalso.rb, line 13</span>
200
+ <span class="ruby-keyword">def</span> <span class="ruby-identifier">to_s</span>
201
+ <span class="ruby-identifier">cadena</span> = <span class="ruby-ivar">@ask</span> <span class="ruby-operator">+</span> <span class="ruby-string">&quot;\n&quot;</span>
202
+ <span class="ruby-constant">OPCIONES</span>.<span class="ruby-identifier">each</span> <span class="ruby-keyword">do</span> <span class="ruby-operator">|</span><span class="ruby-identifier">m</span>,<span class="ruby-identifier">i</span><span class="ruby-operator">|</span>
203
+ <span class="ruby-identifier">cadena</span> <span class="ruby-operator">+=</span> <span class="ruby-node">&quot;#{m})#{i}\n&quot;</span>
204
+ <span class="ruby-keyword">end</span>
205
+ <span class="ruby-identifier">cadena</span>
206
+ <span class="ruby-keyword">end</span></pre>
207
+ </div>
208
+
209
+ </div>
210
+
211
+
212
+
213
+
214
+ </div>
215
+
216
+
217
+ </section>
218
+
219
+ </section>
220
+ </main>
221
+
222
+
223
+ <footer id="validator-badges" role="contentinfo">
224
+ <p><a href="http://validator.w3.org/check/referer">Validate</a>
225
+ <p>Generated by <a href="http://rdoc.rubyforge.org">RDoc</a> 4.1.2.
226
+ <p>Based on <a href="http://deveiate.org/projects/Darkfish-Rdoc/">Darkfish</a> by <a href="http://deveiate.org">Michael Granger</a>.
227
+ </footer>
228
+