estefania_exam 0.0.2

Sign up to get free protection for your applications and to get access to all the features.
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
checksums.yaml ADDED
@@ -0,0 +1,7 @@
1
+ ---
2
+ SHA1:
3
+ metadata.gz: 9c3a16ba3427b58b4eb01dee35f20957ea7bab9c
4
+ data.tar.gz: 2f6f62e1b9a322021c55d2613bb754ddeb0485d6
5
+ SHA512:
6
+ metadata.gz: 5effee243cd8992d5ce34a7cdb4e2532bd65fe0240861331cba302c5b05e68cd3e8fb26f57e8365c16c31c0fa931baf41c57a87644982874312dc8248a8966df
7
+ data.tar.gz: f23b4cba166093ab1de1eb37ae000012f2690b6fad38dc83eaeb94b415a26d6bb60646507f56fb667e66ba7473e1ec20d5bce2df1c7f1ac814aca295223d5909
data/.coveralls.yml ADDED
@@ -0,0 +1 @@
1
+ service-name: travis-ci
data/.gitignore ADDED
@@ -0,0 +1,15 @@
1
+ /.bundle/
2
+ /.yardoc
3
+ /Gemfile.lock
4
+ /_yardoc/
5
+ /coverage/
6
+ /doc/
7
+ /pkg/
8
+ /spec/reports/
9
+ /tmp/
10
+ *.bundle
11
+ *.so
12
+ *.o
13
+ *.a
14
+ mkmf.log
15
+ *.*~
data/.rspec ADDED
@@ -0,0 +1,2 @@
1
+ --color
2
+ --format progress
data/.travis.yml ADDED
@@ -0,0 +1,4 @@
1
+ language: ruby
2
+ rvm:
3
+ - 1.9.3
4
+ - jruby-19mode # JRuby in 1.9 mode
data/Gemfile ADDED
@@ -0,0 +1,4 @@
1
+ source 'https://rubygems.org'
2
+
3
+ # Specify your gem's dependencies in exam.gemspec
4
+ gemspec
data/Guardfile ADDED
@@ -0,0 +1,39 @@
1
+ # A sample Guardfile
2
+ # More info at https://github.com/guard/guard#readme
3
+
4
+ guard :bundler do
5
+ watch('Gemfile')
6
+ # Uncomment next line if your Gemfile contains the `gemspec' command.
7
+ # watch(/^.+\.gemspec/)
8
+ end
9
+
10
+ # Note: The cmd option is now required due to the increasing number of ways
11
+ # rspec may be run, below are examples of the most common uses.
12
+ # * bundler: 'bundle exec rspec'
13
+ # * bundler binstubs: 'bin/rspec'
14
+ # * spring: 'bin/rsspec' (This will use spring if running and you have
15
+ # installed the spring binstubs per the docs)
16
+ # * zeus: 'zeus rspec' (requires the server to be started separetly)
17
+ # * 'just' rspec: 'rspec'
18
+ guard :rspec, cmd: 'bundle exec rspec' do
19
+ watch(%r{^spec/.+_spec\.rb$})
20
+ watch(%r{^lib/(.+)\.rb$}) { |m| "spec/lib/#{m[1]}_spec.rb" }
21
+ watch('spec/spec_helper.rb') { "spec" }
22
+
23
+ # Rails example
24
+ # watch(%r{^app/(.+)\.rb$}) { |m| "spec/#{m[1]}_spec.rb" }
25
+ # watch(%r{^app/(.*)(\.erb|\.haml|\.slim)$}) { |m| "spec/#{m[1]}#{m[2]}_spec.rb" }
26
+ # watch(%r{^app/controllers/(.+)_(controller)\.rb$}) { |m| ["spec/routing/#{m[1]}_routing_spec.rb", "spec/#{m[2]}s/#{m[1]}_#{m[2]}_spec.rb", "spec/acceptance/#{m[1]}_spec.rb"] }
27
+ # watch(%r{^spec/support/(.+)\.rb$}) { "spec" }
28
+ # watch('config/routes.rb') { "spec/routing" }
29
+ # watch('app/controllers/application_controller.rb') { "spec/controllers" }
30
+ # watch('spec/rails_helper.rb') { "spec" }
31
+
32
+ # # Capybara features specs
33
+ # watch(%r{^app/views/(.+)/.*\.(erb|haml|slim)$}) { |m| "spec/features/#{m[1]}_spec.rb" }
34
+
35
+ # # Turnip features and steps
36
+ # watch(%r{^spec/acceptance/(.+)\.feature$})
37
+ # watch(%r{^spec/acceptance/steps/(.+)_steps\.rb$}) { |m| Dir[File.join("**/#{m[1]}.feature")][0] || 'spec/acceptance' }
38
+ end
39
+
data/LICENSE.txt ADDED
@@ -0,0 +1,22 @@
1
+ Copyright (c) 2014 Adrian
2
+
3
+ MIT License
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining
6
+ a copy of this software and associated documentation files (the
7
+ "Software"), to deal in the Software without restriction, including
8
+ without limitation the rights to use, copy, modify, merge, publish,
9
+ distribute, sublicense, and/or sell copies of the Software, and to
10
+ permit persons to whom the Software is furnished to do so, subject to
11
+ the following conditions:
12
+
13
+ The above copyright notice and this permission notice shall be
14
+ included in all copies or substantial portions of the Software.
15
+
16
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
17
+ EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
18
+ MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
19
+ NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
20
+ LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
21
+ OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
22
+ WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
data/README.md ADDED
@@ -0,0 +1,12 @@
1
+ [![Build Status](https://travis-ci.org/alu0100698688/LPP_M_25_Pc11.svg)](https://travis-ci.org/alu0100698688/LPP_M_25_Pc11)
2
+ [![Coverage Status](https://coveralls.io/repos/alu0100698688/LPP_M_25_Pc11/badge.png)](https://coveralls.io/r/alu0100698688/LPP_M_25_Pc11)
3
+
4
+ # Práctica 11: Diseñar e implementar un lenguaje de dominio específico.
5
+
6
+ ## Miembros del grupo.
7
+ * Estefanía Morales Luís.
8
+
9
+
10
+ ## Descripción de la práctica.
11
+ La práctica consiste en diseñar un lenguaje de dominio específico para generar un examen. Seguidamente se
12
+ construirá la gema y se publicará creando una cuenta en rubygems.org.
data/Rakefile ADDED
@@ -0,0 +1,14 @@
1
+ require "bundler/gem_tasks"
2
+
3
+ task :default => :spec
4
+
5
+ desc "Ejecutar las espectativas de la clase Exam"
6
+ task :spec do
7
+ sh "rspec -I. spec/exam_spec.rb"
8
+ end
9
+
10
+ desc "Ejecutar con documentacion"
11
+ task :doc do
12
+ sh "rspec -I. spec/exam_spec.rb --format documentation"
13
+ end
14
+
data/exam.gemspec ADDED
@@ -0,0 +1,28 @@
1
+ # coding: utf-8
2
+ lib = File.expand_path('../lib', __FILE__)
3
+ $LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)
4
+ require 'exam/version'
5
+
6
+ Gem::Specification.new do |spec|
7
+ spec.name = "estefania_exam"
8
+ spec.version = Exam::VERSION
9
+ spec.authors = ["Estefania"]
10
+ spec.email = ["fany.morl@gmail.com"]
11
+ spec.summary = "Creación de una clase exam usando Bunle y el método de desarrollo dirigido por pruebas."
12
+ spec.description = "Crear la clase exam."
13
+ spec.homepage = ""
14
+ spec.license = "MIT"
15
+
16
+ spec.files = `git ls-files -z`.split("\x0")
17
+ spec.executables = spec.files.grep(%r{^bin/}) { |f| File.basename(f) }
18
+ spec.test_files = spec.files.grep(%r{^(test|spec|features)/})
19
+ spec.require_paths = ["lib"]
20
+
21
+ spec.add_development_dependency "bundler", "~> 1.7"
22
+ spec.add_development_dependency "rake", "~> 10.0"
23
+ spec.add_development_dependency "rspec", "~>2.11"
24
+ spec.add_development_dependency "guard"
25
+ spec.add_development_dependency "guard-rspec"
26
+ spec.add_development_dependency "guard-bundler"
27
+ spec.add_development_dependency "coveralls"
28
+ end
data/lib/doc/Exam.html ADDED
@@ -0,0 +1,114 @@
1
+ <!DOCTYPE html>
2
+
3
+ <html>
4
+ <head>
5
+ <meta charset="utf-8">
6
+
7
+ <title>module Exam - 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="module">
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
+
61
+
62
+
63
+
64
+ </div>
65
+ </nav>
66
+
67
+ <main role="main" aria-labelledby="module-Exam">
68
+ <h1 id="module-Exam" class="module">
69
+ module Exam
70
+ </h1>
71
+
72
+ <section class="description">
73
+
74
+ <p>Módulo que contiene la clase <a href="Exam/Examen.html">Examen</a>.</p>
75
+
76
+ </section>
77
+
78
+
79
+
80
+
81
+ <section id="5Buntitled-5D" class="documentation-section">
82
+
83
+
84
+
85
+
86
+
87
+ <section class="constants-list">
88
+ <header>
89
+ <h3>Constants</h3>
90
+ </header>
91
+ <dl>
92
+
93
+ <dt id="VERSION">VERSION
94
+
95
+ <dd>
96
+
97
+
98
+ </dl>
99
+ </section>
100
+
101
+
102
+
103
+
104
+
105
+ </section>
106
+ </main>
107
+
108
+
109
+ <footer id="validator-badges" role="contentinfo">
110
+ <p><a href="http://validator.w3.org/check/referer">Validate</a>
111
+ <p>Generated by <a href="http://rdoc.rubyforge.org">RDoc</a> 4.1.2.
112
+ <p>Based on <a href="http://deveiate.org/projects/Darkfish-Rdoc/">Darkfish</a> by <a href="http://deveiate.org">Michael Granger</a>.
113
+ </footer>
114
+
@@ -0,0 +1,350 @@
1
+ <!DOCTYPE html>
2
+
3
+ <html>
4
+ <head>
5
+ <meta charset="utf-8">
6
+
7
+ <title>class Exam::Examen - 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">Enumerable</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-each">#each</a>
90
+
91
+ <li ><a href="#method-i-insertQuestion">#insertQuestion</a>
92
+
93
+ <li ><a href="#method-i-invertirPreguntas">#invertirPreguntas</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::Examen">
104
+ <h1 id="class-Exam::Examen" class="class">
105
+ class Exam::Examen
106
+ </h1>
107
+
108
+ <section class="description">
109
+
110
+ <p>Esta clase permite crear un examen donde se almacenan preguntas.</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-preguntas" class="method-detail">
132
+ <div class="method-heading attribute-method-heading">
133
+ <span class="method-name">preguntas</span><span
134
+ class="attribute-access-type">[R]</span>
135
+ </div>
136
+
137
+ <div class="method-description">
138
+
139
+ <p>Atributo que almacena un listado de preguntas para el examen</p>
140
+
141
+ </div>
142
+ </div>
143
+
144
+ </section>
145
+
146
+
147
+
148
+ <section id="public-class-5Buntitled-5D-method-details" class="method-section">
149
+ <header>
150
+ <h3>Public Class Methods</h3>
151
+ </header>
152
+
153
+
154
+ <div id="method-c-new" class="method-detail ">
155
+
156
+ <div class="method-heading">
157
+ <span class="method-name">new</span><span
158
+ class="method-args">(listaPreguntas)</span>
159
+
160
+ <span class="method-click-advice">click to toggle source</span>
161
+
162
+ </div>
163
+
164
+
165
+ <div class="method-description">
166
+
167
+ <p>Inicialización del conjunto de preguntas del examen.</p>
168
+
169
+
170
+
171
+
172
+ <div class="method-source-code" id="new-source">
173
+ <pre><span class="ruby-comment"># File exam.rb, line 13</span>
174
+ <span class="ruby-keyword">def</span> <span class="ruby-identifier">initialize</span> (<span class="ruby-identifier">listaPreguntas</span>)
175
+ <span class="ruby-ivar">@preguntas</span> = <span class="ruby-identifier">listaPreguntas</span>
176
+ <span class="ruby-keyword">end</span></pre>
177
+ </div>
178
+
179
+ </div>
180
+
181
+
182
+
183
+
184
+ </div>
185
+
186
+
187
+ </section>
188
+
189
+ <section id="public-instance-5Buntitled-5D-method-details" class="method-section">
190
+ <header>
191
+ <h3>Public Instance Methods</h3>
192
+ </header>
193
+
194
+
195
+ <div id="method-i-each" class="method-detail ">
196
+
197
+ <div class="method-heading">
198
+ <span class="method-name">each</span><span
199
+ class="method-args">()</span>
200
+
201
+ <span class="method-click-advice">click to toggle source</span>
202
+
203
+ </div>
204
+
205
+
206
+ <div class="method-description">
207
+
208
+ <p>Método que hay que implementar al incluir el Mixin Enumerable. LLamada al
209
+ each de la lista de preguntas.</p>
210
+
211
+
212
+
213
+
214
+ <div class="method-source-code" id="each-source">
215
+ <pre><span class="ruby-comment"># File exam.rb, line 39</span>
216
+ <span class="ruby-keyword">def</span> <span class="ruby-identifier">each</span>
217
+ <span class="ruby-ivar">@preguntas</span>.<span class="ruby-identifier">each</span>
218
+
219
+ <span class="ruby-keyword">end</span></pre>
220
+ </div>
221
+
222
+ </div>
223
+
224
+
225
+
226
+
227
+ </div>
228
+
229
+
230
+ <div id="method-i-insertQuestion" class="method-detail ">
231
+
232
+ <div class="method-heading">
233
+ <span class="method-name">insertQuestion</span><span
234
+ class="method-args">(question)</span>
235
+
236
+ <span class="method-click-advice">click to toggle source</span>
237
+
238
+ </div>
239
+
240
+
241
+ <div class="method-description">
242
+
243
+ <p>Método que permite la inserción de una pregunta en el listado del examen</p>
244
+
245
+
246
+
247
+
248
+ <div class="method-source-code" id="insertQuestion-source">
249
+ <pre><span class="ruby-comment"># File exam.rb, line 17</span>
250
+ <span class="ruby-keyword">def</span> <span class="ruby-identifier">insertQuestion</span>(<span class="ruby-identifier">question</span>)
251
+ <span class="ruby-identifier">nodoNuevo</span> = <span class="ruby-constant">Node</span>.<span class="ruby-identifier">new</span>(<span class="ruby-identifier">question</span>,<span class="ruby-keyword">nil</span>,<span class="ruby-ivar">@preguntas</span>.<span class="ruby-identifier">cola</span>)
252
+ <span class="ruby-identifier">nodoInsertado</span> = <span class="ruby-ivar">@preguntas</span>.<span class="ruby-identifier">insert</span>(<span class="ruby-identifier">nodoNuevo</span>)
253
+ <span class="ruby-identifier">nodoInsertado</span>.<span class="ruby-identifier">value</span>
254
+ <span class="ruby-keyword">end</span></pre>
255
+ </div>
256
+
257
+ </div>
258
+
259
+
260
+
261
+
262
+ </div>
263
+
264
+
265
+ <div id="method-i-invertirPreguntas" class="method-detail ">
266
+
267
+ <div class="method-heading">
268
+ <span class="method-name">invertirPreguntas</span><span
269
+ class="method-args">()</span>
270
+
271
+ <span class="method-click-advice">click to toggle source</span>
272
+
273
+ </div>
274
+
275
+
276
+ <div class="method-description">
277
+
278
+ <p>Método para invertir la lista</p>
279
+
280
+
281
+
282
+
283
+ <div class="method-source-code" id="invertirPreguntas-source">
284
+ <pre><span class="ruby-comment"># File exam.rb, line 23</span>
285
+ <span class="ruby-keyword">def</span> <span class="ruby-identifier">invertirPreguntas</span>
286
+ <span class="ruby-identifier">cadena</span>=<span class="ruby-string">&quot;&quot;</span>
287
+ <span class="ruby-ivar">@preguntas</span>.<span class="ruby-identifier">reverse_each</span> <span class="ruby-keyword">do</span> <span class="ruby-operator">|</span><span class="ruby-identifier">preg</span><span class="ruby-operator">|</span>
288
+ <span class="ruby-identifier">cadena</span> <span class="ruby-operator">+=</span> <span class="ruby-identifier">preg</span>.<span class="ruby-identifier">to_s</span>
289
+ <span class="ruby-keyword">end</span>
290
+ <span class="ruby-identifier">cadena</span>
291
+ <span class="ruby-keyword">end</span></pre>
292
+ </div>
293
+
294
+ </div>
295
+
296
+
297
+
298
+
299
+ </div>
300
+
301
+
302
+ <div id="method-i-to_s" class="method-detail ">
303
+
304
+ <div class="method-heading">
305
+ <span class="method-name">to_s</span><span
306
+ class="method-args">()</span>
307
+
308
+ <span class="method-click-advice">click to toggle source</span>
309
+
310
+ </div>
311
+
312
+
313
+ <div class="method-description">
314
+
315
+ <p>Método que devuelve una cadena con las preguntas del examen</p>
316
+
317
+
318
+
319
+
320
+ <div class="method-source-code" id="to_s-source">
321
+ <pre><span class="ruby-comment"># File exam.rb, line 31</span>
322
+ <span class="ruby-keyword">def</span> <span class="ruby-identifier">to_s</span>
323
+ <span class="ruby-identifier">cadena</span> =<span class="ruby-string">&quot;&quot;</span>
324
+ <span class="ruby-keyword">for</span> <span class="ruby-identifier">i</span> <span class="ruby-keyword">in</span> <span class="ruby-ivar">@preguntas</span> <span class="ruby-keyword">do</span>
325
+ <span class="ruby-identifier">cadena</span> <span class="ruby-operator">+=</span><span class="ruby-identifier">i</span>.<span class="ruby-identifier">to_s</span>
326
+ <span class="ruby-keyword">end</span>
327
+ <span class="ruby-identifier">cadena</span>
328
+ <span class="ruby-keyword">end</span></pre>
329
+ </div>
330
+
331
+ </div>
332
+
333
+
334
+
335
+
336
+ </div>
337
+
338
+
339
+ </section>
340
+
341
+ </section>
342
+ </main>
343
+
344
+
345
+ <footer id="validator-badges" role="contentinfo">
346
+ <p><a href="http://validator.w3.org/check/referer">Validate</a>
347
+ <p>Generated by <a href="http://rdoc.rubyforge.org">RDoc</a> 4.1.2.
348
+ <p>Based on <a href="http://deveiate.org/projects/Darkfish-Rdoc/">Darkfish</a> by <a href="http://deveiate.org">Michael Granger</a>.
349
+ </footer>
350
+