question-simpleChoice 0.0.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +7 -0
- data/#question-simpleChoice.gemspec# +27 -0
- data/.coveralls.yml +1 -0
- data/.gitignore +15 -0
- data/.rspec +2 -0
- data/.travis.yml +3 -0
- data/.yardoc/checksums +13 -0
- data/.yardoc/object_types +0 -0
- data/.yardoc/objects/root.dat +0 -0
- data/.yardoc/proxy_types +0 -0
- data/Gemfile +7 -0
- data/Guardfile +7 -0
- data/LICENSE.txt +22 -0
- data/README.md +32 -0
- data/Rakefile +15 -0
- data/doc/Examen.html +766 -0
- data/doc/Interfaz.html +440 -0
- data/doc/Lista.html +929 -0
- data/doc/Lista/Node.html +397 -0
- data/doc/Node.html +516 -0
- data/doc/Question.html +117 -0
- data/doc/Question/SimpleChoice.html +132 -0
- data/doc/Question/TrueOrFalse.html +134 -0
- data/doc/QuestionFather.html +565 -0
- data/doc/SimpleChoice.html +505 -0
- data/doc/TrueOrFalse.html +279 -0
- data/doc/_index.html +207 -0
- data/doc/class_list.html +58 -0
- data/doc/css/common.css +1 -0
- data/doc/css/full_list.css +57 -0
- data/doc/css/style.css +339 -0
- data/doc/file.README.html +110 -0
- data/doc/file_list.html +60 -0
- data/doc/frames.html +26 -0
- data/doc/index.html +110 -0
- data/doc/js/app.js +219 -0
- data/doc/js/full_list.js +181 -0
- data/doc/js/jquery.js +4 -0
- data/doc/method_list.html +309 -0
- data/doc/top-level-namespace.html +114 -0
- data/lib/exam/examen.rb +85 -0
- data/lib/interfaz/interfaz.rb +49 -0
- data/lib/interfaz/interfazV2.rb +38 -0
- data/lib/node/node.rb +9 -0
- data/lib/nodelist/list.rb +119 -0
- data/lib/question/questionFather.rb +2 -0
- data/lib/question/questionFather/base.rb +16 -0
- data/lib/question/questionFather/version.rb +5 -0
- data/lib/question/simpleChoice.rb +2 -0
- data/lib/question/simpleChoice/base.rb +17 -0
- data/lib/question/simpleChoice/version.rb +5 -0
- data/lib/question/trueOrFalse.rb +2 -0
- data/lib/question/trueOrFalse/base.rb +10 -0
- data/lib/question/trueOrFalse/version.rb +5 -0
- data/lib/quiz/quiz.rb +58 -0
- data/prueba.html +1 -0
- data/prueba.rb +48 -0
- data/question-simpleChoice.gemspec +27 -0
- data/spec/list_spec.rb +51 -0
- data/spec/quiz_spec.rb +31 -0
- data/spec/simpleChoice_spec.rb +106 -0
- data/spec/spec_examen.rb +21 -0
- data/spec/spec_helper.rb +93 -0
- data/test.html +310 -0
- metadata +183 -0
checksums.yaml
ADDED
@@ -0,0 +1,7 @@
|
|
1
|
+
---
|
2
|
+
SHA1:
|
3
|
+
metadata.gz: 12d8aa11d69052d3c4babe61dfa4d6c442957902
|
4
|
+
data.tar.gz: 0ac04f8f801e930f7ee88aef13381a7a581b0577
|
5
|
+
SHA512:
|
6
|
+
metadata.gz: 860304062bc3afa558e5fb2d19309e051172e87323f0812ab33437381f76b8e20dea6083b1819492b0cec0f7c62b3b23a16f4ebb139b37f37a6a191f9373a602
|
7
|
+
data.tar.gz: ca60f639dfe43ba8f285a269976094bc39a69e3002d95d8a58ebdb9e22b0ccc61fc6042b4db2d4be6ba4d9bf8fbb0e81f01b505a86c822e7a860372961e9a37b
|
@@ -0,0 +1,27 @@
|
|
1
|
+
# coding: utf-8
|
2
|
+
lib = File.expand_path('../lib', __FILE__)
|
3
|
+
$LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)
|
4
|
+
require 'question/simpleChoice/version'
|
5
|
+
|
6
|
+
Gem::Specification.new do |spec|
|
7
|
+
spec.name = "question-simpleChoice"
|
8
|
+
spec.version = Question::SimpleChoice::VERSION
|
9
|
+
spec.authors = ["Eduardo Jes��s D.D."]
|
10
|
+
spec.email = ["edudioniz@gmail.com"]
|
11
|
+
spec.description = %q{creador de examenes}
|
12
|
+
spec.summary = %q{creador de examenes}
|
13
|
+
spec.homepage = ""
|
14
|
+
spec.license = "MIT"
|
15
|
+
|
16
|
+
spec.files = `git ls-files`.split($/)
|
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.3"
|
22
|
+
spec.add_development_dependency "rake"
|
23
|
+
spec.add_development_dependency "guard"
|
24
|
+
spec.add_development_dependency "guard-rspec"
|
25
|
+
spec.add_development_dependency "guard-bundler"
|
26
|
+
|
27
|
+
end
|
data/.coveralls.yml
ADDED
@@ -0,0 +1 @@
|
|
1
|
+
repo_token: Z6Y0rgIyMQDWMuikrVqTlnv6l3kJIC8EF
|
data/.gitignore
ADDED
data/.rspec
ADDED
data/.travis.yml
ADDED
data/.yardoc/checksums
ADDED
@@ -0,0 +1,13 @@
|
|
1
|
+
lib/node/node.rb 521879ad2a7290f6cd8b5949c115a332728fec8f
|
2
|
+
lib/exam/examen.rb 8717f1b2c5cea9f0c3bd2921244d4215dcee5cf4
|
3
|
+
lib/nodelist/list.rb 34eb13d01f57fc5635a3cf55e7a9d931f4029ce5
|
4
|
+
lib/interfaz/interfaz.rb 3e1e86901a47004dcf8a6bc94c32556e36db70dc
|
5
|
+
lib/question/trueOrFalse.rb 9c021de99d63779ebdf5bcdd5c4d74509e06b547
|
6
|
+
lib/question/simpleChoice.rb 166739a9572aa22ce2185393e2fa526847eab71e
|
7
|
+
lib/question/questionFather.rb 99c0e479d5a3b1cc25c20786df92ec0852df88e7
|
8
|
+
lib/question/trueOrFalse/base.rb aac7270567f750d5d0045bb221ee0c0ce8662746
|
9
|
+
lib/question/simpleChoice/base.rb 96692b8b043099036b6b7cf6a3334bc33dc2b616
|
10
|
+
lib/question/questionFather/base.rb b9ad9d29ee88b6bc27f5219dbe7ee58616781bed
|
11
|
+
lib/question/trueOrFalse/version.rb 3220fe1c75492158597f988cb50449b5abc3900a
|
12
|
+
lib/question/simpleChoice/version.rb b128241eff921a1c51a71d4bcc416d487800fc74
|
13
|
+
lib/question/questionFather/version.rb 3220fe1c75492158597f988cb50449b5abc3900a
|
Binary file
|
Binary file
|
data/.yardoc/proxy_types
ADDED
Binary file
|
data/Gemfile
ADDED
data/Guardfile
ADDED
data/LICENSE.txt
ADDED
@@ -0,0 +1,22 @@
|
|
1
|
+
Copyright (c) 2014 Francisco Alderete
|
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,32 @@
|
|
1
|
+
# Práctica 9 de Lenguajes y paradigmas de la programación
|
2
|
+
|
3
|
+
[![Build Status](https://travis-ci.org/alu0100789683/LPP_T_11.svg)](https://travis-ci.org/alu0100789683/LPP_T_11)
|
4
|
+
[![Coverage Status](https://coveralls.io/repos/alu0100789683/LPP_T_11/badge.png)](https://coveralls.io/r/alu0100789683/LPP_T_11)
|
5
|
+
|
6
|
+
TODO: Write a gem description
|
7
|
+
|
8
|
+
## Installation
|
9
|
+
|
10
|
+
Add this line to your application's Gemfile:
|
11
|
+
|
12
|
+
gem 'question-simpleChoice'
|
13
|
+
|
14
|
+
And then execute:
|
15
|
+
|
16
|
+
$ bundle
|
17
|
+
|
18
|
+
Or install it yourself as:
|
19
|
+
|
20
|
+
$ gem install question-simpleChoice
|
21
|
+
|
22
|
+
## Usage
|
23
|
+
|
24
|
+
TODO: Write usage instructions here.
|
25
|
+
|
26
|
+
## Contributing
|
27
|
+
|
28
|
+
1. Fork it
|
29
|
+
2. Create your feature branch (`git checkout -b my-new-feature`)
|
30
|
+
3. Commit your changes (`git commit -am 'Add some feature'`)
|
31
|
+
4. Push to the branch (`git push origin my-new-feature`)
|
32
|
+
5. Create new Pull Request
|
data/Rakefile
ADDED
@@ -0,0 +1,15 @@
|
|
1
|
+
require "bundler/gem_tasks"
|
2
|
+
task :default => :spec
|
3
|
+
|
4
|
+
desc "Ejecutar espectativas"
|
5
|
+
task :spec do
|
6
|
+
sh "rspec -I. spec/simpleChoice_spec.rb"
|
7
|
+
sh "rspec -I. spec/list_spec.rb"
|
8
|
+
sh "rspec -I. spec/spec_examen.rb"
|
9
|
+
sh "rspec -I. spec/quiz_spec.rb"
|
10
|
+
end
|
11
|
+
|
12
|
+
task :html do
|
13
|
+
sh "rspec -f h spec/simpleChoice_spec.rb"
|
14
|
+
end
|
15
|
+
|
data/doc/Examen.html
ADDED
@@ -0,0 +1,766 @@
|
|
1
|
+
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
|
2
|
+
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
3
|
+
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
|
4
|
+
<head>
|
5
|
+
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
|
6
|
+
<title>
|
7
|
+
Class: Examen
|
8
|
+
|
9
|
+
— Documentation by YARD 0.8.7.6
|
10
|
+
|
11
|
+
</title>
|
12
|
+
|
13
|
+
<link rel="stylesheet" href="css/style.css" type="text/css" charset="utf-8" />
|
14
|
+
|
15
|
+
<link rel="stylesheet" href="css/common.css" type="text/css" charset="utf-8" />
|
16
|
+
|
17
|
+
<script type="text/javascript" charset="utf-8">
|
18
|
+
hasFrames = window.top.frames.main ? true : false;
|
19
|
+
relpath = '';
|
20
|
+
framesUrl = "frames.html#!Examen.html";
|
21
|
+
</script>
|
22
|
+
|
23
|
+
|
24
|
+
<script type="text/javascript" charset="utf-8" src="js/jquery.js"></script>
|
25
|
+
|
26
|
+
<script type="text/javascript" charset="utf-8" src="js/app.js"></script>
|
27
|
+
|
28
|
+
|
29
|
+
</head>
|
30
|
+
<body>
|
31
|
+
<div id="header">
|
32
|
+
<div id="menu">
|
33
|
+
|
34
|
+
<a href="_index.html">Index (E)</a> »
|
35
|
+
|
36
|
+
|
37
|
+
<span class="title">Examen</span>
|
38
|
+
|
39
|
+
|
40
|
+
<div class="noframes"><span class="title">(</span><a href="." target="_top">no frames</a><span class="title">)</span></div>
|
41
|
+
</div>
|
42
|
+
|
43
|
+
<div id="search">
|
44
|
+
|
45
|
+
<a class="full_list_link" id="class_list_link"
|
46
|
+
href="class_list.html">
|
47
|
+
Class List
|
48
|
+
</a>
|
49
|
+
|
50
|
+
<a class="full_list_link" id="method_list_link"
|
51
|
+
href="method_list.html">
|
52
|
+
Method List
|
53
|
+
</a>
|
54
|
+
|
55
|
+
<a class="full_list_link" id="file_list_link"
|
56
|
+
href="file_list.html">
|
57
|
+
File List
|
58
|
+
</a>
|
59
|
+
|
60
|
+
</div>
|
61
|
+
<div class="clear"></div>
|
62
|
+
</div>
|
63
|
+
|
64
|
+
<iframe id="search_frame"></iframe>
|
65
|
+
|
66
|
+
<div id="content"><h1>Class: Examen
|
67
|
+
|
68
|
+
|
69
|
+
|
70
|
+
</h1>
|
71
|
+
|
72
|
+
<dl class="box">
|
73
|
+
|
74
|
+
<dt class="r1">Inherits:</dt>
|
75
|
+
<dd class="r1">
|
76
|
+
<span class="inheritName">Object</span>
|
77
|
+
|
78
|
+
<ul class="fullTree">
|
79
|
+
<li>Object</li>
|
80
|
+
|
81
|
+
<li class="next">Examen</li>
|
82
|
+
|
83
|
+
</ul>
|
84
|
+
<a href="#" class="inheritanceTree">show all</a>
|
85
|
+
|
86
|
+
</dd>
|
87
|
+
|
88
|
+
|
89
|
+
|
90
|
+
|
91
|
+
|
92
|
+
|
93
|
+
|
94
|
+
|
95
|
+
|
96
|
+
<dt class="r2 last">Defined in:</dt>
|
97
|
+
<dd class="r2 last">lib/exam/examen.rb</dd>
|
98
|
+
|
99
|
+
</dl>
|
100
|
+
<div class="clear"></div>
|
101
|
+
|
102
|
+
|
103
|
+
|
104
|
+
|
105
|
+
|
106
|
+
<h2>Instance Attribute Summary <small>(<a href="#" class="summary_toggle">collapse</a>)</small></h2>
|
107
|
+
<ul class="summary">
|
108
|
+
|
109
|
+
<li class="public ">
|
110
|
+
<span class="summary_signature">
|
111
|
+
|
112
|
+
<a href="#acierto-instance_method" title="#acierto (instance method)">- (Object) <strong>acierto</strong> </a>
|
113
|
+
|
114
|
+
|
115
|
+
|
116
|
+
</span>
|
117
|
+
|
118
|
+
|
119
|
+
|
120
|
+
|
121
|
+
|
122
|
+
|
123
|
+
|
124
|
+
|
125
|
+
|
126
|
+
|
127
|
+
|
128
|
+
|
129
|
+
<span class="summary_desc"><div class='inline'>
|
130
|
+
<p>Returns the value of attribute acierto.</p>
|
131
|
+
</div></span>
|
132
|
+
|
133
|
+
</li>
|
134
|
+
|
135
|
+
|
136
|
+
<li class="public ">
|
137
|
+
<span class="summary_signature">
|
138
|
+
|
139
|
+
<a href="#fallo-instance_method" title="#fallo (instance method)">- (Object) <strong>fallo</strong> </a>
|
140
|
+
|
141
|
+
|
142
|
+
|
143
|
+
</span>
|
144
|
+
|
145
|
+
|
146
|
+
|
147
|
+
|
148
|
+
|
149
|
+
|
150
|
+
|
151
|
+
|
152
|
+
|
153
|
+
|
154
|
+
|
155
|
+
|
156
|
+
<span class="summary_desc"><div class='inline'>
|
157
|
+
<p>Returns the value of attribute fallo.</p>
|
158
|
+
</div></span>
|
159
|
+
|
160
|
+
</li>
|
161
|
+
|
162
|
+
|
163
|
+
<li class="public ">
|
164
|
+
<span class="summary_signature">
|
165
|
+
|
166
|
+
<a href="#list-instance_method" title="#list (instance method)">- (Object) <strong>list</strong> </a>
|
167
|
+
|
168
|
+
|
169
|
+
|
170
|
+
</span>
|
171
|
+
|
172
|
+
|
173
|
+
|
174
|
+
|
175
|
+
|
176
|
+
|
177
|
+
|
178
|
+
|
179
|
+
|
180
|
+
|
181
|
+
|
182
|
+
|
183
|
+
<span class="summary_desc"><div class='inline'>
|
184
|
+
<p>Returns the value of attribute list.</p>
|
185
|
+
</div></span>
|
186
|
+
|
187
|
+
</li>
|
188
|
+
|
189
|
+
|
190
|
+
<li class="public ">
|
191
|
+
<span class="summary_signature">
|
192
|
+
|
193
|
+
<a href="#node_i-instance_method" title="#node_i (instance method)">- (Object) <strong>node_i</strong> </a>
|
194
|
+
|
195
|
+
|
196
|
+
|
197
|
+
</span>
|
198
|
+
|
199
|
+
|
200
|
+
|
201
|
+
|
202
|
+
|
203
|
+
|
204
|
+
|
205
|
+
|
206
|
+
|
207
|
+
|
208
|
+
|
209
|
+
|
210
|
+
<span class="summary_desc"><div class='inline'>
|
211
|
+
<p>Returns the value of attribute node_i.</p>
|
212
|
+
</div></span>
|
213
|
+
|
214
|
+
</li>
|
215
|
+
|
216
|
+
|
217
|
+
</ul>
|
218
|
+
|
219
|
+
|
220
|
+
|
221
|
+
|
222
|
+
|
223
|
+
<h2>
|
224
|
+
Instance Method Summary
|
225
|
+
<small>(<a href="#" class="summary_toggle">collapse</a>)</small>
|
226
|
+
</h2>
|
227
|
+
|
228
|
+
<ul class="summary">
|
229
|
+
|
230
|
+
<li class="public ">
|
231
|
+
<span class="summary_signature">
|
232
|
+
|
233
|
+
<a href="#initialize-instance_method" title="#initialize (instance method)">- (Examen) <strong>initialize</strong>(list) </a>
|
234
|
+
|
235
|
+
|
236
|
+
|
237
|
+
</span>
|
238
|
+
|
239
|
+
|
240
|
+
<span class="note title constructor">constructor</span>
|
241
|
+
|
242
|
+
|
243
|
+
|
244
|
+
|
245
|
+
|
246
|
+
|
247
|
+
|
248
|
+
|
249
|
+
<span class="summary_desc"><div class='inline'>
|
250
|
+
<p>A new instance of Examen.</p>
|
251
|
+
</div></span>
|
252
|
+
|
253
|
+
</li>
|
254
|
+
|
255
|
+
|
256
|
+
<li class="public ">
|
257
|
+
<span class="summary_signature">
|
258
|
+
|
259
|
+
<a href="#next_question-instance_method" title="#next_question (instance method)">- (Object) <strong>next_question</strong> </a>
|
260
|
+
|
261
|
+
|
262
|
+
|
263
|
+
</span>
|
264
|
+
|
265
|
+
|
266
|
+
|
267
|
+
|
268
|
+
|
269
|
+
|
270
|
+
|
271
|
+
|
272
|
+
|
273
|
+
<span class="summary_desc"><div class='inline'></div></span>
|
274
|
+
|
275
|
+
</li>
|
276
|
+
|
277
|
+
|
278
|
+
<li class="public ">
|
279
|
+
<span class="summary_signature">
|
280
|
+
|
281
|
+
<a href="#response_question-instance_method" title="#response_question (instance method)">- (Object) <strong>response_question</strong>(value) </a>
|
282
|
+
|
283
|
+
|
284
|
+
|
285
|
+
</span>
|
286
|
+
|
287
|
+
|
288
|
+
|
289
|
+
|
290
|
+
|
291
|
+
|
292
|
+
|
293
|
+
|
294
|
+
|
295
|
+
<span class="summary_desc"><div class='inline'></div></span>
|
296
|
+
|
297
|
+
</li>
|
298
|
+
|
299
|
+
|
300
|
+
<li class="public ">
|
301
|
+
<span class="summary_signature">
|
302
|
+
|
303
|
+
<a href="#reverse_question-instance_method" title="#reverse_question (instance method)">- (Object) <strong>reverse_question</strong> </a>
|
304
|
+
|
305
|
+
|
306
|
+
|
307
|
+
</span>
|
308
|
+
|
309
|
+
|
310
|
+
|
311
|
+
|
312
|
+
|
313
|
+
|
314
|
+
|
315
|
+
|
316
|
+
|
317
|
+
<span class="summary_desc"><div class='inline'></div></span>
|
318
|
+
|
319
|
+
</li>
|
320
|
+
|
321
|
+
|
322
|
+
<li class="public ">
|
323
|
+
<span class="summary_signature">
|
324
|
+
|
325
|
+
<a href="#show_stats-instance_method" title="#show_stats (instance method)">- (Object) <strong>show_stats</strong> </a>
|
326
|
+
|
327
|
+
|
328
|
+
|
329
|
+
</span>
|
330
|
+
|
331
|
+
|
332
|
+
|
333
|
+
|
334
|
+
|
335
|
+
|
336
|
+
|
337
|
+
|
338
|
+
|
339
|
+
<span class="summary_desc"><div class='inline'></div></span>
|
340
|
+
|
341
|
+
</li>
|
342
|
+
|
343
|
+
|
344
|
+
</ul>
|
345
|
+
|
346
|
+
|
347
|
+
<div id="constructor_details" class="method_details_list">
|
348
|
+
<h2>Constructor Details</h2>
|
349
|
+
|
350
|
+
<div class="method_details first">
|
351
|
+
<h3 class="signature first" id="initialize-instance_method">
|
352
|
+
|
353
|
+
- (<tt><span class='object_link'><a href="" title="Examen (class)">Examen</a></span></tt>) <strong>initialize</strong>(list)
|
354
|
+
|
355
|
+
|
356
|
+
|
357
|
+
|
358
|
+
|
359
|
+
</h3><div class="docstring">
|
360
|
+
<div class="discussion">
|
361
|
+
|
362
|
+
<p>Returns a new instance of Examen</p>
|
363
|
+
|
364
|
+
|
365
|
+
</div>
|
366
|
+
</div>
|
367
|
+
<div class="tags">
|
368
|
+
|
369
|
+
|
370
|
+
</div><table class="source_code">
|
371
|
+
<tr>
|
372
|
+
<td>
|
373
|
+
<pre class="lines">
|
374
|
+
|
375
|
+
|
376
|
+
12
|
377
|
+
13
|
378
|
+
14
|
379
|
+
15
|
380
|
+
16</pre>
|
381
|
+
</td>
|
382
|
+
<td>
|
383
|
+
<pre class="code"><span class="info file"># File 'lib/exam/examen.rb', line 12</span>
|
384
|
+
|
385
|
+
<span class='kw'>def</span> <span class='id identifier rubyid_initialize'>initialize</span><span class='lparen'>(</span><span class='id identifier rubyid_list'>list</span><span class='rparen'>)</span>
|
386
|
+
<span class='ivar'>@acierto</span> <span class='op'>=</span> <span class='int'>0</span>
|
387
|
+
<span class='ivar'>@fallo</span> <span class='op'>=</span> <span class='int'>0</span>
|
388
|
+
<span class='ivar'>@list</span> <span class='op'>=</span> <span class='id identifier rubyid_list'>list</span>
|
389
|
+
<span class='kw'>end</span></pre>
|
390
|
+
</td>
|
391
|
+
</tr>
|
392
|
+
</table>
|
393
|
+
</div>
|
394
|
+
|
395
|
+
</div>
|
396
|
+
|
397
|
+
<div id="instance_attr_details" class="attr_details">
|
398
|
+
<h2>Instance Attribute Details</h2>
|
399
|
+
|
400
|
+
|
401
|
+
<span id="acierto=-instance_method"></span>
|
402
|
+
<div class="method_details first">
|
403
|
+
<h3 class="signature first" id="acierto-instance_method">
|
404
|
+
|
405
|
+
- (<tt>Object</tt>) <strong>acierto</strong>
|
406
|
+
|
407
|
+
|
408
|
+
|
409
|
+
|
410
|
+
|
411
|
+
</h3><div class="docstring">
|
412
|
+
<div class="discussion">
|
413
|
+
|
414
|
+
<p>Returns the value of attribute acierto</p>
|
415
|
+
|
416
|
+
|
417
|
+
</div>
|
418
|
+
</div>
|
419
|
+
<div class="tags">
|
420
|
+
|
421
|
+
|
422
|
+
</div><table class="source_code">
|
423
|
+
<tr>
|
424
|
+
<td>
|
425
|
+
<pre class="lines">
|
426
|
+
|
427
|
+
|
428
|
+
11
|
429
|
+
12
|
430
|
+
13</pre>
|
431
|
+
</td>
|
432
|
+
<td>
|
433
|
+
<pre class="code"><span class="info file"># File 'lib/exam/examen.rb', line 11</span>
|
434
|
+
|
435
|
+
<span class='kw'>def</span> <span class='id identifier rubyid_acierto'>acierto</span>
|
436
|
+
<span class='ivar'>@acierto</span>
|
437
|
+
<span class='kw'>end</span></pre>
|
438
|
+
</td>
|
439
|
+
</tr>
|
440
|
+
</table>
|
441
|
+
</div>
|
442
|
+
|
443
|
+
|
444
|
+
<span id="fallo=-instance_method"></span>
|
445
|
+
<div class="method_details ">
|
446
|
+
<h3 class="signature " id="fallo-instance_method">
|
447
|
+
|
448
|
+
- (<tt>Object</tt>) <strong>fallo</strong>
|
449
|
+
|
450
|
+
|
451
|
+
|
452
|
+
|
453
|
+
|
454
|
+
</h3><div class="docstring">
|
455
|
+
<div class="discussion">
|
456
|
+
|
457
|
+
<p>Returns the value of attribute fallo</p>
|
458
|
+
|
459
|
+
|
460
|
+
</div>
|
461
|
+
</div>
|
462
|
+
<div class="tags">
|
463
|
+
|
464
|
+
|
465
|
+
</div><table class="source_code">
|
466
|
+
<tr>
|
467
|
+
<td>
|
468
|
+
<pre class="lines">
|
469
|
+
|
470
|
+
|
471
|
+
11
|
472
|
+
12
|
473
|
+
13</pre>
|
474
|
+
</td>
|
475
|
+
<td>
|
476
|
+
<pre class="code"><span class="info file"># File 'lib/exam/examen.rb', line 11</span>
|
477
|
+
|
478
|
+
<span class='kw'>def</span> <span class='id identifier rubyid_fallo'>fallo</span>
|
479
|
+
<span class='ivar'>@fallo</span>
|
480
|
+
<span class='kw'>end</span></pre>
|
481
|
+
</td>
|
482
|
+
</tr>
|
483
|
+
</table>
|
484
|
+
</div>
|
485
|
+
|
486
|
+
|
487
|
+
<span id="list=-instance_method"></span>
|
488
|
+
<div class="method_details ">
|
489
|
+
<h3 class="signature " id="list-instance_method">
|
490
|
+
|
491
|
+
- (<tt>Object</tt>) <strong>list</strong>
|
492
|
+
|
493
|
+
|
494
|
+
|
495
|
+
|
496
|
+
|
497
|
+
</h3><div class="docstring">
|
498
|
+
<div class="discussion">
|
499
|
+
|
500
|
+
<p>Returns the value of attribute list</p>
|
501
|
+
|
502
|
+
|
503
|
+
</div>
|
504
|
+
</div>
|
505
|
+
<div class="tags">
|
506
|
+
|
507
|
+
|
508
|
+
</div><table class="source_code">
|
509
|
+
<tr>
|
510
|
+
<td>
|
511
|
+
<pre class="lines">
|
512
|
+
|
513
|
+
|
514
|
+
11
|
515
|
+
12
|
516
|
+
13</pre>
|
517
|
+
</td>
|
518
|
+
<td>
|
519
|
+
<pre class="code"><span class="info file"># File 'lib/exam/examen.rb', line 11</span>
|
520
|
+
|
521
|
+
<span class='kw'>def</span> <span class='id identifier rubyid_list'>list</span>
|
522
|
+
<span class='ivar'>@list</span>
|
523
|
+
<span class='kw'>end</span></pre>
|
524
|
+
</td>
|
525
|
+
</tr>
|
526
|
+
</table>
|
527
|
+
</div>
|
528
|
+
|
529
|
+
|
530
|
+
<span id="node_i=-instance_method"></span>
|
531
|
+
<div class="method_details ">
|
532
|
+
<h3 class="signature " id="node_i-instance_method">
|
533
|
+
|
534
|
+
- (<tt>Object</tt>) <strong>node_i</strong>
|
535
|
+
|
536
|
+
|
537
|
+
|
538
|
+
|
539
|
+
|
540
|
+
</h3><div class="docstring">
|
541
|
+
<div class="discussion">
|
542
|
+
|
543
|
+
<p>Returns the value of attribute node_i</p>
|
544
|
+
|
545
|
+
|
546
|
+
</div>
|
547
|
+
</div>
|
548
|
+
<div class="tags">
|
549
|
+
|
550
|
+
|
551
|
+
</div><table class="source_code">
|
552
|
+
<tr>
|
553
|
+
<td>
|
554
|
+
<pre class="lines">
|
555
|
+
|
556
|
+
|
557
|
+
11
|
558
|
+
12
|
559
|
+
13</pre>
|
560
|
+
</td>
|
561
|
+
<td>
|
562
|
+
<pre class="code"><span class="info file"># File 'lib/exam/examen.rb', line 11</span>
|
563
|
+
|
564
|
+
<span class='kw'>def</span> <span class='id identifier rubyid_node_i'>node_i</span>
|
565
|
+
<span class='ivar'>@node_i</span>
|
566
|
+
<span class='kw'>end</span></pre>
|
567
|
+
</td>
|
568
|
+
</tr>
|
569
|
+
</table>
|
570
|
+
</div>
|
571
|
+
|
572
|
+
</div>
|
573
|
+
|
574
|
+
|
575
|
+
<div id="instance_method_details" class="method_details_list">
|
576
|
+
<h2>Instance Method Details</h2>
|
577
|
+
|
578
|
+
|
579
|
+
<div class="method_details first">
|
580
|
+
<h3 class="signature first" id="next_question-instance_method">
|
581
|
+
|
582
|
+
- (<tt>Object</tt>) <strong>next_question</strong>
|
583
|
+
|
584
|
+
|
585
|
+
|
586
|
+
|
587
|
+
|
588
|
+
</h3><table class="source_code">
|
589
|
+
<tr>
|
590
|
+
<td>
|
591
|
+
<pre class="lines">
|
592
|
+
|
593
|
+
|
594
|
+
18
|
595
|
+
19
|
596
|
+
20
|
597
|
+
21
|
598
|
+
22
|
599
|
+
23
|
600
|
+
24
|
601
|
+
25
|
602
|
+
26
|
603
|
+
27
|
604
|
+
28
|
605
|
+
29
|
606
|
+
30
|
607
|
+
31</pre>
|
608
|
+
</td>
|
609
|
+
<td>
|
610
|
+
<pre class="code"><span class="info file"># File 'lib/exam/examen.rb', line 18</span>
|
611
|
+
|
612
|
+
<span class='kw'>def</span> <span class='id identifier rubyid_next_question'>next_question</span><span class='lparen'>(</span><span class='rparen'>)</span>
|
613
|
+
<span class='kw'>if</span> <span class='ivar'>@node_i</span> <span class='op'>!=</span> <span class='kw'>nil</span> <span class='kw'>then</span>
|
614
|
+
<span class='kw'>if</span> <span class='ivar'>@node_i</span><span class='period'>.</span><span class='id identifier rubyid_next'>next</span> <span class='op'>!=</span> <span class='kw'>nil</span> <span class='kw'>then</span>
|
615
|
+
<span class='ivar'>@node_i</span> <span class='op'>=</span> <span class='ivar'>@node_i</span><span class='period'>.</span><span class='id identifier rubyid_next'>next</span>
|
616
|
+
<span class='kw'>else</span>
|
617
|
+
<span class='kw'>return</span> <span class='kw'>nil</span>
|
618
|
+
<span class='kw'>end</span>
|
619
|
+
<span class='kw'>else</span>
|
620
|
+
<span class='ivar'>@node_i</span> <span class='op'>=</span> <span class='ivar'>@list</span><span class='period'>.</span><span class='id identifier rubyid_head'>head</span>
|
621
|
+
<span class='kw'>end</span>
|
622
|
+
|
623
|
+
<span class='id identifier rubyid_puts'>puts</span> <span class='ivar'>@node_i</span><span class='period'>.</span><span class='id identifier rubyid_value'>value</span><span class='period'>.</span><span class='id identifier rubyid_to_s'>to_s</span>
|
624
|
+
<span class='kw'>return</span> <span class='ivar'>@node_i</span><span class='period'>.</span><span class='id identifier rubyid_value'>value</span><span class='period'>.</span><span class='id identifier rubyid_to_s'>to_s</span>
|
625
|
+
<span class='kw'>end</span></pre>
|
626
|
+
</td>
|
627
|
+
</tr>
|
628
|
+
</table>
|
629
|
+
</div>
|
630
|
+
|
631
|
+
<div class="method_details ">
|
632
|
+
<h3 class="signature " id="response_question-instance_method">
|
633
|
+
|
634
|
+
- (<tt>Object</tt>) <strong>response_question</strong>(value)
|
635
|
+
|
636
|
+
|
637
|
+
|
638
|
+
|
639
|
+
|
640
|
+
</h3><table class="source_code">
|
641
|
+
<tr>
|
642
|
+
<td>
|
643
|
+
<pre class="lines">
|
644
|
+
|
645
|
+
|
646
|
+
35
|
647
|
+
36
|
648
|
+
37
|
649
|
+
38
|
650
|
+
39
|
651
|
+
40
|
652
|
+
41
|
653
|
+
42
|
654
|
+
43
|
655
|
+
44
|
656
|
+
45
|
657
|
+
46
|
658
|
+
47
|
659
|
+
48</pre>
|
660
|
+
</td>
|
661
|
+
<td>
|
662
|
+
<pre class="code"><span class="info file"># File 'lib/exam/examen.rb', line 35</span>
|
663
|
+
|
664
|
+
<span class='kw'>def</span> <span class='id identifier rubyid_response_question'>response_question</span><span class='lparen'>(</span><span class='id identifier rubyid_value'>value</span><span class='rparen'>)</span>
|
665
|
+
<span class='id identifier rubyid_print'>print</span> <span class='tstring'><span class='tstring_beg'>"</span><span class='tstring_content'>Respuesta: </span><span class='tstring_end'>"</span></span>
|
666
|
+
<span class='kw'>if</span> <span class='id identifier rubyid_value'>value</span> <span class='op'>==</span> <span class='ivar'>@node_i</span><span class='period'>.</span><span class='id identifier rubyid_value'>value</span><span class='period'>.</span><span class='id identifier rubyid_right'>right</span> <span class='kw'>then</span>
|
667
|
+
<span class='id identifier rubyid_puts'>puts</span> <span class='tstring'><span class='tstring_beg'>"</span><span class='tstring_content'>\n</span><span class='tstring_end'>"</span></span>
|
668
|
+
<span class='id identifier rubyid_puts'>puts</span> <span class='tstring'><span class='tstring_beg'>"</span><span class='tstring_content'>La pregunta es correcta</span><span class='tstring_end'>"</span></span>
|
669
|
+
<span class='id identifier rubyid_puts'>puts</span> <span class='tstring'><span class='tstring_beg'>"</span><span class='tstring_content'>\n</span><span class='tstring_end'>"</span></span>
|
670
|
+
<span class='ivar'>@acierto</span> <span class='op'>+=</span> <span class='int'>1</span>
|
671
|
+
<span class='kw'>else</span>
|
672
|
+
<span class='id identifier rubyid_puts'>puts</span> <span class='tstring'><span class='tstring_beg'>"</span><span class='tstring_content'>\n</span><span class='tstring_end'>"</span></span>
|
673
|
+
<span class='id identifier rubyid_puts'>puts</span> <span class='tstring'><span class='tstring_beg'>"</span><span class='tstring_content'>La pregunta es incorrecta</span><span class='tstring_end'>"</span></span>
|
674
|
+
<span class='id identifier rubyid_puts'>puts</span> <span class='tstring'><span class='tstring_beg'>"</span><span class='tstring_content'>\n</span><span class='tstring_end'>"</span></span>
|
675
|
+
<span class='ivar'>@fallo</span> <span class='op'>+=</span> <span class='int'>1</span>
|
676
|
+
<span class='kw'>end</span>
|
677
|
+
<span class='kw'>end</span></pre>
|
678
|
+
</td>
|
679
|
+
</tr>
|
680
|
+
</table>
|
681
|
+
</div>
|
682
|
+
|
683
|
+
<div class="method_details ">
|
684
|
+
<h3 class="signature " id="reverse_question-instance_method">
|
685
|
+
|
686
|
+
- (<tt>Object</tt>) <strong>reverse_question</strong>
|
687
|
+
|
688
|
+
|
689
|
+
|
690
|
+
|
691
|
+
|
692
|
+
</h3><table class="source_code">
|
693
|
+
<tr>
|
694
|
+
<td>
|
695
|
+
<pre class="lines">
|
696
|
+
|
697
|
+
|
698
|
+
32
|
699
|
+
33
|
700
|
+
34</pre>
|
701
|
+
</td>
|
702
|
+
<td>
|
703
|
+
<pre class="code"><span class="info file"># File 'lib/exam/examen.rb', line 32</span>
|
704
|
+
|
705
|
+
<span class='kw'>def</span> <span class='id identifier rubyid_reverse_question'>reverse_question</span>
|
706
|
+
<span class='ivar'>@list</span><span class='period'>.</span><span class='id identifier rubyid_reverse'>reverse</span>
|
707
|
+
<span class='kw'>end</span></pre>
|
708
|
+
</td>
|
709
|
+
</tr>
|
710
|
+
</table>
|
711
|
+
</div>
|
712
|
+
|
713
|
+
<div class="method_details ">
|
714
|
+
<h3 class="signature " id="show_stats-instance_method">
|
715
|
+
|
716
|
+
- (<tt>Object</tt>) <strong>show_stats</strong>
|
717
|
+
|
718
|
+
|
719
|
+
|
720
|
+
|
721
|
+
|
722
|
+
</h3><table class="source_code">
|
723
|
+
<tr>
|
724
|
+
<td>
|
725
|
+
<pre class="lines">
|
726
|
+
|
727
|
+
|
728
|
+
49
|
729
|
+
50
|
730
|
+
51
|
731
|
+
52
|
732
|
+
53
|
733
|
+
54
|
734
|
+
55
|
735
|
+
56
|
736
|
+
57</pre>
|
737
|
+
</td>
|
738
|
+
<td>
|
739
|
+
<pre class="code"><span class="info file"># File 'lib/exam/examen.rb', line 49</span>
|
740
|
+
|
741
|
+
<span class='kw'>def</span> <span class='id identifier rubyid_show_stats'>show_stats</span>
|
742
|
+
<span class='id identifier rubyid_puts'>puts</span> <span class='tstring'><span class='tstring_beg'>"</span><span class='tstring_content'>\n</span><span class='tstring_end'>"</span></span>
|
743
|
+
<span class='id identifier rubyid_puts'>puts</span> <span class='tstring'><span class='tstring_beg'>"</span><span class='tstring_content'>|---------------------------|</span><span class='tstring_end'>"</span></span>
|
744
|
+
<span class='id identifier rubyid_puts'>puts</span> <span class='tstring'><span class='tstring_beg'>"</span><span class='tstring_content'>|--- Estadisticas ---|</span><span class='tstring_end'>"</span></span>
|
745
|
+
<span class='id identifier rubyid_puts'>puts</span> <span class='tstring'><span class='tstring_beg'>"</span><span class='tstring_content'>|---------------------------|</span><span class='tstring_end'>"</span></span>
|
746
|
+
<span class='id identifier rubyid_puts'>puts</span> <span class='tstring'><span class='tstring_beg'>"</span><span class='tstring_content'>|- Aciertos: </span><span class='embexpr_beg'>#{</span><span class='ivar'>@acierto</span><span class='embexpr_end'>}</span><span class='tstring_content'> | Fallos: </span><span class='embexpr_beg'>#{</span><span class='ivar'>@fallo</span><span class='embexpr_end'>}</span><span class='tstring_content'> -|</span><span class='tstring_end'>"</span></span>
|
747
|
+
<span class='id identifier rubyid_puts'>puts</span> <span class='tstring'><span class='tstring_beg'>"</span><span class='tstring_content'>|---------------------------|</span><span class='tstring_end'>"</span></span>
|
748
|
+
<span class='id identifier rubyid_puts'>puts</span> <span class='tstring'><span class='tstring_beg'>"</span><span class='tstring_content'>\n</span><span class='tstring_end'>"</span></span>
|
749
|
+
<span class='kw'>end</span></pre>
|
750
|
+
</td>
|
751
|
+
</tr>
|
752
|
+
</table>
|
753
|
+
</div>
|
754
|
+
|
755
|
+
</div>
|
756
|
+
|
757
|
+
</div>
|
758
|
+
|
759
|
+
<div id="footer">
|
760
|
+
Generated on Thu Nov 27 14:39:06 2014 by
|
761
|
+
<a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
|
762
|
+
0.8.7.6 (ruby-2.0.0).
|
763
|
+
</div>
|
764
|
+
|
765
|
+
</body>
|
766
|
+
</html>
|