examen 1.2.4
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.
- checksums.yaml +7 -0
- data/.coveralls.yml +1 -0
- data/.gitignore +14 -0
- data/.rspec +2 -0
- data/.travis.yml +6 -0
- data/Gemfile +8 -0
- data/Gemfile.lock +91 -0
- data/Guardfile +40 -0
- data/LICENSE.txt +22 -0
- data/README.md +65 -0
- data/README.rdoc +65 -0
- data/Rakefile +25 -0
- data/doc/prct10.pdf +0 -0
- data/doc/prct5.pdf +0 -0
- data/doc/prct6.pdf +0 -0
- data/doc/prct7.pdf +0 -0
- data/doc/prct8.pdf +0 -0
- data/doc/prct9.pdf +0 -0
- data/doc/pruebas/index.html +430 -0
- data/examen.gemspec +29 -0
- data/html/Exam.html +296 -0
- data/html/Examen.html +119 -0
- data/html/ExamenIu.html +278 -0
- data/html/Lista.html +536 -0
- data/html/Object.html +119 -0
- data/html/Pregunta.html +361 -0
- data/html/PreguntaVerdaderoFalso.html +169 -0
- data/html/Quiz.html +363 -0
- data/html/README_rdoc.html +154 -0
- data/html/created.rid +11 -0
- data/html/fonts.css +167 -0
- data/html/fonts/Lato-Light.ttf +0 -0
- data/html/fonts/Lato-LightItalic.ttf +0 -0
- data/html/fonts/Lato-Regular.ttf +0 -0
- data/html/fonts/Lato-RegularItalic.ttf +0 -0
- data/html/fonts/SourceCodePro-Bold.ttf +0 -0
- data/html/fonts/SourceCodePro-Regular.ttf +0 -0
- data/html/images/add.png +0 -0
- data/html/images/arrow_up.png +0 -0
- data/html/images/brick.png +0 -0
- data/html/images/brick_link.png +0 -0
- data/html/images/bug.png +0 -0
- data/html/images/bullet_black.png +0 -0
- data/html/images/bullet_toggle_minus.png +0 -0
- data/html/images/bullet_toggle_plus.png +0 -0
- data/html/images/date.png +0 -0
- data/html/images/delete.png +0 -0
- data/html/images/find.png +0 -0
- data/html/images/loadingAnimation.gif +0 -0
- data/html/images/macFFBgHack.png +0 -0
- data/html/images/package.png +0 -0
- data/html/images/page_green.png +0 -0
- data/html/images/page_white_text.png +0 -0
- data/html/images/page_white_width.png +0 -0
- data/html/images/plugin.png +0 -0
- data/html/images/ruby.png +0 -0
- data/html/images/tag_blue.png +0 -0
- data/html/images/tag_green.png +0 -0
- data/html/images/transparent.png +0 -0
- data/html/images/wrench.png +0 -0
- data/html/images/wrench_orange.png +0 -0
- data/html/images/zoom.png +0 -0
- data/html/index.html +178 -0
- data/html/js/darkfish.js +140 -0
- data/html/js/jquery.js +4 -0
- data/html/js/navigation.js +142 -0
- data/html/js/search.js +109 -0
- data/html/js/search_index.js +1 -0
- data/html/js/searcher.js +228 -0
- data/html/rdoc.css +580 -0
- data/html/table_of_contents.html +204 -0
- data/lib/examen.rb +3 -0
- data/lib/examen/base.rb +3 -0
- data/lib/examen/exam.rb +24 -0
- data/lib/examen/examen_iu.rb +38 -0
- data/lib/examen/lista.rb +108 -0
- data/lib/examen/pregunta.rb +38 -0
- data/lib/examen/pregunta_verdadero_falso.rb +16 -0
- data/lib/examen/quiz.rb +35 -0
- data/lib/examen/version.rb +4 -0
- data/spec/examen_spec.rb +334 -0
- data/spec/spec_helper.rb +99 -0
- metadata +229 -0
@@ -0,0 +1,169 @@
|
|
1
|
+
<!DOCTYPE html>
|
2
|
+
|
3
|
+
<html>
|
4
|
+
<head>
|
5
|
+
<meta charset="UTF-8">
|
6
|
+
|
7
|
+
<title>class PreguntaVerdaderoFalso - 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="Pregunta.html">Pregunta</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
|
+
</ul>
|
79
|
+
</div>
|
80
|
+
|
81
|
+
</div>
|
82
|
+
</nav>
|
83
|
+
|
84
|
+
<main role="main" aria-labelledby="class-PreguntaVerdaderoFalso">
|
85
|
+
<h1 id="class-PreguntaVerdaderoFalso" class="class">
|
86
|
+
class PreguntaVerdaderoFalso
|
87
|
+
</h1>
|
88
|
+
|
89
|
+
<section class="description">
|
90
|
+
|
91
|
+
<p>Clase gestora de preguntas de verdadero y falso.</p>
|
92
|
+
|
93
|
+
</section>
|
94
|
+
|
95
|
+
|
96
|
+
|
97
|
+
|
98
|
+
<section id="5Buntitled-5D" class="documentation-section">
|
99
|
+
|
100
|
+
|
101
|
+
|
102
|
+
|
103
|
+
|
104
|
+
|
105
|
+
|
106
|
+
|
107
|
+
|
108
|
+
<section id="public-class-5Buntitled-5D-method-details" class="method-section">
|
109
|
+
<header>
|
110
|
+
<h3>Public Class Methods</h3>
|
111
|
+
</header>
|
112
|
+
|
113
|
+
|
114
|
+
<div id="method-c-new" class="method-detail ">
|
115
|
+
|
116
|
+
<div class="method-heading">
|
117
|
+
<span class="method-name">new</span><span
|
118
|
+
class="method-args">(args)</span>
|
119
|
+
|
120
|
+
<span class="method-click-advice">click to toggle source</span>
|
121
|
+
|
122
|
+
</div>
|
123
|
+
|
124
|
+
|
125
|
+
<div class="method-description">
|
126
|
+
|
127
|
+
<p>Instancia de la clase <a
|
128
|
+
href="PreguntaVerdaderoFalso.html">PreguntaVerdaderoFalso</a> donde le
|
129
|
+
pasas un texto y un booleano asociado a la respuesta correcta.</p>
|
130
|
+
|
131
|
+
|
132
|
+
<div class="method-calls-super">
|
133
|
+
Calls superclass method
|
134
|
+
<a href="Pregunta.html#method-c-new">Pregunta.new</a>
|
135
|
+
</div>
|
136
|
+
|
137
|
+
|
138
|
+
|
139
|
+
<div class="method-source-code" id="new-source">
|
140
|
+
<pre><span class="ruby-comment"># File lib/examen/pregunta_verdadero_falso.rb, line 7</span>
|
141
|
+
<span class="ruby-keyword">def</span> <span class="ruby-identifier">initialize</span>(<span class="ruby-identifier">args</span>)
|
142
|
+
<span class="ruby-identifier">raise</span> <span class="ruby-constant">ArgumentError</span>, <span class="ruby-string">"Esperada pregunta (:text)"</span> <span class="ruby-keyword">unless</span> <span class="ruby-identifier">args</span>.<span class="ruby-identifier">key?</span>(<span class="ruby-value">:text</span>)
|
143
|
+
<span class="ruby-identifier">raise</span> <span class="ruby-constant">ArgumentError</span>, <span class="ruby-string">"Esperada respuesta correcta (:right)"</span> <span class="ruby-keyword">unless</span> <span class="ruby-identifier">args</span>.<span class="ruby-identifier">key?</span>(<span class="ruby-value">:right</span>)
|
144
|
+
<span class="ruby-identifier">args</span>[<span class="ruby-value">:right</span>] = ((<span class="ruby-identifier">args</span>[<span class="ruby-value">:right</span>])<span class="ruby-operator">?</span><span class="ruby-string">"Cierto"</span><span class="ruby-operator">:</span><span class="ruby-string">"Falso"</span>)
|
145
|
+
<span class="ruby-identifier">args</span>[<span class="ruby-value">:distractors</span>] = [((<span class="ruby-identifier">args</span>[<span class="ruby-value">:right</span>])<span class="ruby-operator">?</span><span class="ruby-string">"Falso"</span><span class="ruby-operator">:</span><span class="ruby-string">"Cierto"</span>)]
|
146
|
+
<span class="ruby-keyword">super</span> <span class="ruby-identifier">args</span>
|
147
|
+
<span class="ruby-keyword">end</span></pre>
|
148
|
+
</div>
|
149
|
+
|
150
|
+
</div>
|
151
|
+
|
152
|
+
|
153
|
+
|
154
|
+
|
155
|
+
</div>
|
156
|
+
|
157
|
+
|
158
|
+
</section>
|
159
|
+
|
160
|
+
</section>
|
161
|
+
</main>
|
162
|
+
|
163
|
+
|
164
|
+
<footer id="validator-badges" role="contentinfo">
|
165
|
+
<p><a href="http://validator.w3.org/check/referer">Validate</a>
|
166
|
+
<p>Generated by <a href="http://rdoc.rubyforge.org">RDoc</a> 4.1.0.
|
167
|
+
<p>Based on <a href="http://deveiate.org/projects/Darkfish-Rdoc/">Darkfish</a> by <a href="http://deveiate.org">Michael Granger</a>.
|
168
|
+
</footer>
|
169
|
+
|
data/html/Quiz.html
ADDED
@@ -0,0 +1,363 @@
|
|
1
|
+
<!DOCTYPE html>
|
2
|
+
|
3
|
+
<html>
|
4
|
+
<head>
|
5
|
+
<meta charset="UTF-8">
|
6
|
+
|
7
|
+
<title>class Quiz - RDoc Documentation</title>
|
8
|
+
|
9
|
+
<link href="./fonts.css" rel="stylesheet">
|
10
|
+
<link href="./rdoc.css" rel="stylesheet">
|
11
|
+
|
12
|
+
<script type="text/javascript">
|
13
|
+
var rdoc_rel_prefix = "./";
|
14
|
+
</script>
|
15
|
+
|
16
|
+
<script src="./js/jquery.js"></script>
|
17
|
+
<script src="./js/navigation.js"></script>
|
18
|
+
<script src="./js/search_index.js"></script>
|
19
|
+
<script src="./js/search.js"></script>
|
20
|
+
<script src="./js/searcher.js"></script>
|
21
|
+
<script src="./js/darkfish.js"></script>
|
22
|
+
|
23
|
+
|
24
|
+
<body id="top" role="document" class="class">
|
25
|
+
<nav role="navigation">
|
26
|
+
<div id="project-navigation">
|
27
|
+
<div id="home-section" role="region" title="Quick navigation" class="nav-section">
|
28
|
+
<h2>
|
29
|
+
<a href="./index.html" rel="home">Home</a>
|
30
|
+
</h2>
|
31
|
+
|
32
|
+
<div id="table-of-contents-navigation">
|
33
|
+
<a href="./table_of_contents.html#pages">Pages</a>
|
34
|
+
<a href="./table_of_contents.html#classes">Classes</a>
|
35
|
+
<a href="./table_of_contents.html#methods">Methods</a>
|
36
|
+
</div>
|
37
|
+
</div>
|
38
|
+
|
39
|
+
<div id="search-section" role="search" class="project-section initially-hidden">
|
40
|
+
<form action="#" method="get" accept-charset="utf-8">
|
41
|
+
<div id="search-field-wrapper">
|
42
|
+
<input id="search-field" role="combobox" aria-label="Search"
|
43
|
+
aria-autocomplete="list" aria-controls="search-results"
|
44
|
+
type="text" name="search" placeholder="Search" spellcheck="false"
|
45
|
+
title="Type to search, Up and Down to navigate, Enter to load">
|
46
|
+
</div>
|
47
|
+
|
48
|
+
<ul id="search-results" aria-label="Search Results"
|
49
|
+
aria-busy="false" aria-expanded="false"
|
50
|
+
aria-atomic="false" class="initially-hidden"></ul>
|
51
|
+
</form>
|
52
|
+
</div>
|
53
|
+
|
54
|
+
</div>
|
55
|
+
|
56
|
+
|
57
|
+
|
58
|
+
<div id="class-metadata">
|
59
|
+
|
60
|
+
<div id="parent-class-section" class="nav-section">
|
61
|
+
<h3>Parent</h3>
|
62
|
+
|
63
|
+
|
64
|
+
<p class="link"><a href="Object.html">Object</a>
|
65
|
+
|
66
|
+
</div>
|
67
|
+
|
68
|
+
|
69
|
+
|
70
|
+
<!-- Method Quickref -->
|
71
|
+
<div id="method-list-section" class="nav-section">
|
72
|
+
<h3>Methods</h3>
|
73
|
+
|
74
|
+
<ul class="link-list" role="directory">
|
75
|
+
|
76
|
+
<li ><a href="#method-c-new">::new</a>
|
77
|
+
|
78
|
+
<li ><a href="#method-i-question">#question</a>
|
79
|
+
|
80
|
+
<li ><a href="#method-i-right">#right</a>
|
81
|
+
|
82
|
+
<li ><a href="#method-i-to_s">#to_s</a>
|
83
|
+
|
84
|
+
<li ><a href="#method-i-wrong">#wrong</a>
|
85
|
+
|
86
|
+
</ul>
|
87
|
+
</div>
|
88
|
+
|
89
|
+
</div>
|
90
|
+
</nav>
|
91
|
+
|
92
|
+
<main role="main" aria-labelledby="class-Quiz">
|
93
|
+
<h1 id="class-Quiz" class="class">
|
94
|
+
class Quiz
|
95
|
+
</h1>
|
96
|
+
|
97
|
+
<section class="description">
|
98
|
+
|
99
|
+
<p>Clase gestora de un DSL</p>
|
100
|
+
|
101
|
+
</section>
|
102
|
+
|
103
|
+
|
104
|
+
|
105
|
+
|
106
|
+
<section id="5Buntitled-5D" class="documentation-section">
|
107
|
+
|
108
|
+
|
109
|
+
|
110
|
+
|
111
|
+
|
112
|
+
|
113
|
+
|
114
|
+
<section class="attribute-method-details" class="method-section">
|
115
|
+
<header>
|
116
|
+
<h3>Attributes</h3>
|
117
|
+
</header>
|
118
|
+
|
119
|
+
|
120
|
+
<div id="attribute-i-count" class="method-detail">
|
121
|
+
<div class="method-heading attribute-method-heading">
|
122
|
+
<span class="method-name">count</span><span
|
123
|
+
class="attribute-access-type">[RW]</span>
|
124
|
+
</div>
|
125
|
+
|
126
|
+
<div class="method-description">
|
127
|
+
|
128
|
+
|
129
|
+
|
130
|
+
</div>
|
131
|
+
</div>
|
132
|
+
|
133
|
+
<div id="attribute-i-exam" class="method-detail">
|
134
|
+
<div class="method-heading attribute-method-heading">
|
135
|
+
<span class="method-name">exam</span><span
|
136
|
+
class="attribute-access-type">[RW]</span>
|
137
|
+
</div>
|
138
|
+
|
139
|
+
<div class="method-description">
|
140
|
+
|
141
|
+
|
142
|
+
|
143
|
+
</div>
|
144
|
+
</div>
|
145
|
+
|
146
|
+
<div id="attribute-i-title" class="method-detail">
|
147
|
+
<div class="method-heading attribute-method-heading">
|
148
|
+
<span class="method-name">title</span><span
|
149
|
+
class="attribute-access-type">[RW]</span>
|
150
|
+
</div>
|
151
|
+
|
152
|
+
<div class="method-description">
|
153
|
+
|
154
|
+
|
155
|
+
|
156
|
+
</div>
|
157
|
+
</div>
|
158
|
+
|
159
|
+
</section>
|
160
|
+
|
161
|
+
|
162
|
+
|
163
|
+
<section id="public-class-5Buntitled-5D-method-details" class="method-section">
|
164
|
+
<header>
|
165
|
+
<h3>Public Class Methods</h3>
|
166
|
+
</header>
|
167
|
+
|
168
|
+
|
169
|
+
<div id="method-c-new" class="method-detail ">
|
170
|
+
|
171
|
+
<div class="method-heading">
|
172
|
+
<span class="method-name">new</span><span
|
173
|
+
class="method-args">(title, &block)</span>
|
174
|
+
|
175
|
+
<span class="method-click-advice">click to toggle source</span>
|
176
|
+
|
177
|
+
</div>
|
178
|
+
|
179
|
+
|
180
|
+
<div class="method-description">
|
181
|
+
|
182
|
+
<p>Crea una Instancia de la clase <a href="Quiz.html">Quiz</a>, a partir de un
|
183
|
+
título y un bloque</p>
|
184
|
+
|
185
|
+
|
186
|
+
|
187
|
+
|
188
|
+
<div class="method-source-code" id="new-source">
|
189
|
+
<pre><span class="ruby-comment"># File lib/examen/quiz.rb, line 6</span>
|
190
|
+
<span class="ruby-keyword">def</span> <span class="ruby-identifier">initialize</span>(<span class="ruby-identifier">title</span>, <span class="ruby-operator">&</span><span class="ruby-identifier">block</span>)
|
191
|
+
<span class="ruby-ivar">@title</span> = <span class="ruby-identifier">title</span>
|
192
|
+
<span class="ruby-ivar">@exam</span> = <span class="ruby-constant">Exam</span>.<span class="ruby-identifier">new</span>(<span class="ruby-constant">Pregunta</span>.<span class="ruby-identifier">new</span>(<span class="ruby-value">:text</span> =<span class="ruby-operator">></span> <span class="ruby-string">"dummy"</span>, <span class="ruby-value">:right</span> =<span class="ruby-operator">></span> <span class="ruby-string">"dummy"</span>, <span class="ruby-value">:distractors</span> =<span class="ruby-operator">></span> [<span class="ruby-string">"dummy"</span>]))
|
193
|
+
<span class="ruby-ivar">@exam</span>.<span class="ruby-identifier">list</span>.<span class="ruby-identifier">pop</span>
|
194
|
+
<span class="ruby-ivar">@count</span> = <span class="ruby-value">0</span>
|
195
|
+
<span class="ruby-identifier">instance_eval</span> <span class="ruby-operator">&</span><span class="ruby-identifier">block</span>
|
196
|
+
<span class="ruby-keyword">end</span></pre>
|
197
|
+
</div>
|
198
|
+
|
199
|
+
</div>
|
200
|
+
|
201
|
+
|
202
|
+
|
203
|
+
|
204
|
+
</div>
|
205
|
+
|
206
|
+
|
207
|
+
</section>
|
208
|
+
|
209
|
+
<section id="public-instance-5Buntitled-5D-method-details" class="method-section">
|
210
|
+
<header>
|
211
|
+
<h3>Public Instance Methods</h3>
|
212
|
+
</header>
|
213
|
+
|
214
|
+
|
215
|
+
<div id="method-i-question" class="method-detail ">
|
216
|
+
|
217
|
+
<div class="method-heading">
|
218
|
+
<span class="method-name">question</span><span
|
219
|
+
class="method-args">(*args)</span>
|
220
|
+
|
221
|
+
<span class="method-click-advice">click to toggle source</span>
|
222
|
+
|
223
|
+
</div>
|
224
|
+
|
225
|
+
|
226
|
+
<div class="method-description">
|
227
|
+
|
228
|
+
<p>Actualiza el examen actual, con una nueva pregunta</p>
|
229
|
+
|
230
|
+
|
231
|
+
|
232
|
+
|
233
|
+
<div class="method-source-code" id="question-source">
|
234
|
+
<pre><span class="ruby-comment"># File lib/examen/quiz.rb, line 23</span>
|
235
|
+
<span class="ruby-keyword">def</span> <span class="ruby-identifier">question</span>(<span class="ruby-operator">*</span><span class="ruby-identifier">args</span>)
|
236
|
+
<span class="ruby-identifier">distract</span> = <span class="ruby-constant">Array</span>.<span class="ruby-identifier">new</span>
|
237
|
+
<span class="ruby-identifier">args</span>[<span class="ruby-value">1</span>].<span class="ruby-identifier">keys</span>.<span class="ruby-identifier">each</span> { <span class="ruby-operator">|</span><span class="ruby-identifier">x</span><span class="ruby-operator">|</span> <span class="ruby-identifier">distract</span> <span class="ruby-operator"><<</span> <span class="ruby-identifier">args</span>[<span class="ruby-value">1</span>][<span class="ruby-identifier">x</span>] <span class="ruby-keyword">if</span> <span class="ruby-identifier">x</span>.<span class="ruby-identifier">class</span>.<span class="ruby-identifier">equal?</span> <span class="ruby-constant">Array</span> }
|
238
|
+
<span class="ruby-identifier">exam</span> <span class="ruby-operator"><<</span> <span class="ruby-constant">Pregunta</span>.<span class="ruby-identifier">new</span>(<span class="ruby-value">:text</span> =<span class="ruby-operator">></span> <span class="ruby-identifier">args</span>[<span class="ruby-value">0</span>], <span class="ruby-value">:right</span> =<span class="ruby-operator">></span> <span class="ruby-identifier">args</span>[<span class="ruby-value">1</span>][<span class="ruby-value">:right</span>], <span class="ruby-value">:distractors</span> =<span class="ruby-operator">></span> <span class="ruby-identifier">distract</span>)
|
239
|
+
<span class="ruby-identifier">exam</span>
|
240
|
+
<span class="ruby-keyword">end</span></pre>
|
241
|
+
</div>
|
242
|
+
|
243
|
+
</div>
|
244
|
+
|
245
|
+
|
246
|
+
|
247
|
+
|
248
|
+
</div>
|
249
|
+
|
250
|
+
|
251
|
+
<div id="method-i-right" class="method-detail ">
|
252
|
+
|
253
|
+
<div class="method-heading">
|
254
|
+
<span class="method-name">right</span><span
|
255
|
+
class="method-args">()</span>
|
256
|
+
|
257
|
+
<span class="method-click-advice">click to toggle source</span>
|
258
|
+
|
259
|
+
</div>
|
260
|
+
|
261
|
+
|
262
|
+
<div class="method-description">
|
263
|
+
|
264
|
+
<p>Devuelve el Simbolo :right</p>
|
265
|
+
|
266
|
+
|
267
|
+
|
268
|
+
|
269
|
+
<div class="method-source-code" id="right-source">
|
270
|
+
<pre><span class="ruby-comment"># File lib/examen/quiz.rb, line 14</span>
|
271
|
+
<span class="ruby-keyword">def</span> <span class="ruby-identifier">right</span>
|
272
|
+
<span class="ruby-value">:right</span>
|
273
|
+
<span class="ruby-keyword">end</span></pre>
|
274
|
+
</div>
|
275
|
+
|
276
|
+
</div>
|
277
|
+
|
278
|
+
|
279
|
+
|
280
|
+
|
281
|
+
</div>
|
282
|
+
|
283
|
+
|
284
|
+
<div id="method-i-to_s" class="method-detail ">
|
285
|
+
|
286
|
+
<div class="method-heading">
|
287
|
+
<span class="method-name">to_s</span><span
|
288
|
+
class="method-args">()</span>
|
289
|
+
|
290
|
+
<span class="method-click-advice">click to toggle source</span>
|
291
|
+
|
292
|
+
</div>
|
293
|
+
|
294
|
+
|
295
|
+
<div class="method-description">
|
296
|
+
|
297
|
+
<p>Definicion del Metodo <a href="Quiz.html#method-i-to_s">#to_s</a>, para la
|
298
|
+
Clase <a href="Quiz.html">Quiz</a></p>
|
299
|
+
|
300
|
+
|
301
|
+
|
302
|
+
|
303
|
+
<div class="method-source-code" id="to_s-source">
|
304
|
+
<pre><span class="ruby-comment"># File lib/examen/quiz.rb, line 30</span>
|
305
|
+
<span class="ruby-keyword">def</span> <span class="ruby-identifier">to_s</span>
|
306
|
+
<span class="ruby-node">"\s\s#{@title}\n#{'#' * (@title.size + 4)}\n\n#{@exam}"</span>
|
307
|
+
<span class="ruby-keyword">end</span></pre>
|
308
|
+
</div>
|
309
|
+
|
310
|
+
</div>
|
311
|
+
|
312
|
+
|
313
|
+
|
314
|
+
|
315
|
+
</div>
|
316
|
+
|
317
|
+
|
318
|
+
<div id="method-i-wrong" class="method-detail ">
|
319
|
+
|
320
|
+
<div class="method-heading">
|
321
|
+
<span class="method-name">wrong</span><span
|
322
|
+
class="method-args">()</span>
|
323
|
+
|
324
|
+
<span class="method-click-advice">click to toggle source</span>
|
325
|
+
|
326
|
+
</div>
|
327
|
+
|
328
|
+
|
329
|
+
<div class="method-description">
|
330
|
+
|
331
|
+
<p>Devuelve un Array con el Simbolo :wrong y un indice</p>
|
332
|
+
|
333
|
+
|
334
|
+
|
335
|
+
|
336
|
+
<div class="method-source-code" id="wrong-source">
|
337
|
+
<pre><span class="ruby-comment"># File lib/examen/quiz.rb, line 18</span>
|
338
|
+
<span class="ruby-keyword">def</span> <span class="ruby-identifier">wrong</span>
|
339
|
+
<span class="ruby-ivar">@count</span> <span class="ruby-operator">+=</span> <span class="ruby-value">1</span>
|
340
|
+
[<span class="ruby-value">:wrong</span>, <span class="ruby-ivar">@count</span>]
|
341
|
+
<span class="ruby-keyword">end</span></pre>
|
342
|
+
</div>
|
343
|
+
|
344
|
+
</div>
|
345
|
+
|
346
|
+
|
347
|
+
|
348
|
+
|
349
|
+
</div>
|
350
|
+
|
351
|
+
|
352
|
+
</section>
|
353
|
+
|
354
|
+
</section>
|
355
|
+
</main>
|
356
|
+
|
357
|
+
|
358
|
+
<footer id="validator-badges" role="contentinfo">
|
359
|
+
<p><a href="http://validator.w3.org/check/referer">Validate</a>
|
360
|
+
<p>Generated by <a href="http://rdoc.rubyforge.org">RDoc</a> 4.1.0.
|
361
|
+
<p>Based on <a href="http://deveiate.org/projects/Darkfish-Rdoc/">Darkfish</a> by <a href="http://deveiate.org">Michael Granger</a>.
|
362
|
+
</footer>
|
363
|
+
|