lpp_Grupo3 0.1.0
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/.travis.yml +6 -0
- data/CODE_OF_CONDUCT.md +13 -0
- data/Gemfile +4 -0
- data/Gemfile.lock +104 -0
- data/Guardfile +87 -0
- data/LICENSE.txt +21 -0
- data/README.md +41 -0
- data/Rakefile +5 -0
- data/bin/console +14 -0
- data/bin/setup +7 -0
- data/coverage/.last_run.json +5 -0
- data/coverage/.resultset.json +7 -0
- data/coverage/.resultset.json.lock +0 -0
- data/doc/Articulo.html +289 -0
- data/doc/Bibliografia.html +306 -0
- data/doc/CODE_OF_CONDUCT_md.html +125 -0
- data/doc/Cita.html +348 -0
- data/doc/CitaArticulo.html +286 -0
- data/doc/CitaCapitulo.html +333 -0
- data/doc/CitaEdoc.html +334 -0
- data/doc/CitaLibro.html +333 -0
- data/doc/Citayanoexiste.html +113 -0
- data/doc/G03ref.html +417 -0
- data/doc/Gemfile.html +100 -0
- data/doc/Gemfile_lock.html +206 -0
- data/doc/Guardfile.html +185 -0
- data/doc/LICENSE_txt.html +117 -0
- data/doc/Libro.html +365 -0
- data/doc/List.html +379 -0
- data/doc/LppGrupo3.html +109 -0
- data/doc/Lpp_Grupo3.html +95 -0
- data/doc/Object.html +161 -0
- data/doc/README_md.html +163 -0
- data/doc/Rakefile.html +99 -0
- data/doc/bin/setup.html +101 -0
- data/doc/created.rid +20 -0
- data/doc/css/fonts.css +167 -0
- data/doc/css/rdoc.css +590 -0
- data/doc/fonts/Lato-Light.ttf +0 -0
- data/doc/fonts/Lato-LightItalic.ttf +0 -0
- data/doc/fonts/Lato-Regular.ttf +0 -0
- data/doc/fonts/Lato-RegularItalic.ttf +0 -0
- data/doc/fonts/SourceCodePro-Bold.ttf +0 -0
- data/doc/fonts/SourceCodePro-Regular.ttf +0 -0
- data/doc/images/add.png +0 -0
- data/doc/images/arrow_up.png +0 -0
- data/doc/images/brick.png +0 -0
- data/doc/images/brick_link.png +0 -0
- data/doc/images/bug.png +0 -0
- data/doc/images/bullet_black.png +0 -0
- data/doc/images/bullet_toggle_minus.png +0 -0
- data/doc/images/bullet_toggle_plus.png +0 -0
- data/doc/images/date.png +0 -0
- data/doc/images/delete.png +0 -0
- data/doc/images/find.png +0 -0
- data/doc/images/loadingAnimation.gif +0 -0
- data/doc/images/macFFBgHack.png +0 -0
- data/doc/images/package.png +0 -0
- data/doc/images/page_green.png +0 -0
- data/doc/images/page_white_text.png +0 -0
- data/doc/images/page_white_width.png +0 -0
- data/doc/images/plugin.png +0 -0
- data/doc/images/ruby.png +0 -0
- data/doc/images/tag_blue.png +0 -0
- data/doc/images/tag_green.png +0 -0
- data/doc/images/transparent.png +0 -0
- data/doc/images/wrench.png +0 -0
- data/doc/images/wrench_orange.png +0 -0
- data/doc/images/zoom.png +0 -0
- data/doc/index.html +131 -0
- data/doc/js/darkfish.js +161 -0
- data/doc/js/jquery.js +4 -0
- data/doc/js/navigation.js +142 -0
- data/doc/js/navigation.js.gz +0 -0
- data/doc/js/search.js +109 -0
- data/doc/js/search_index.js +1 -0
- data/doc/js/search_index.js.gz +0 -0
- data/doc/js/searcher.js +228 -0
- data/doc/js/searcher.js.gz +0 -0
- data/doc/lpp_Grupo3_gemspec.html +134 -0
- data/doc/table_of_contents.html +332 -0
- data/lib/lpp_Grupo3.rb +8 -0
- data/lib/lpp_Grupo3/bibliografia.rb +38 -0
- data/lib/lpp_Grupo3/cita.rb +232 -0
- data/lib/lpp_Grupo3/list.rb +61 -0
- data/lib/lpp_Grupo3/reference.rb +110 -0
- data/lib/lpp_Grupo3/version.rb +3 -0
- data/lpp_Grupo3.gemspec +37 -0
- metadata +232 -0
@@ -0,0 +1,332 @@
|
|
1
|
+
<!DOCTYPE html>
|
2
|
+
|
3
|
+
<html>
|
4
|
+
<head>
|
5
|
+
<meta charset="UTF-8">
|
6
|
+
|
7
|
+
<title>Table of Contents - RDoc Documentation</title>
|
8
|
+
|
9
|
+
<script type="text/javascript">
|
10
|
+
var rdoc_rel_prefix = "./";
|
11
|
+
</script>
|
12
|
+
|
13
|
+
<script src="./js/jquery.js"></script>
|
14
|
+
<script src="./js/darkfish.js"></script>
|
15
|
+
|
16
|
+
<link href="./css/fonts.css" rel="stylesheet">
|
17
|
+
<link href="./css/rdoc.css" rel="stylesheet">
|
18
|
+
|
19
|
+
|
20
|
+
|
21
|
+
<body id="top" class="table-of-contents">
|
22
|
+
<main role="main">
|
23
|
+
<h1 class="class">Table of Contents - RDoc Documentation</h1>
|
24
|
+
|
25
|
+
<h2 id="pages">Pages</h2>
|
26
|
+
<ul>
|
27
|
+
<li class="file">
|
28
|
+
<a href="CODE_OF_CONDUCT_md.html">CODE_OF_CONDUCT</a>
|
29
|
+
|
30
|
+
<ul>
|
31
|
+
<li><a href="CODE_OF_CONDUCT_md.html#label-Contributor+Code+of+Conduct">Contributor Code of Conduct</a>
|
32
|
+
</ul>
|
33
|
+
</li>
|
34
|
+
<li class="file">
|
35
|
+
<a href="Gemfile.html">Gemfile</a>
|
36
|
+
</li>
|
37
|
+
<li class="file">
|
38
|
+
<a href="Gemfile_lock.html">Gemfile.lock</a>
|
39
|
+
</li>
|
40
|
+
<li class="file">
|
41
|
+
<a href="Guardfile.html">Guardfile</a>
|
42
|
+
</li>
|
43
|
+
<li class="file">
|
44
|
+
<a href="LICENSE_txt.html">LICENSE</a>
|
45
|
+
</li>
|
46
|
+
<li class="file">
|
47
|
+
<a href="README_md.html">README</a>
|
48
|
+
|
49
|
+
<ul>
|
50
|
+
<li><a href="README_md.html#label-LppGrupo3">LppGrupo3</a>
|
51
|
+
<li><a href="README_md.html#label-Installation">Installation</a>
|
52
|
+
<li><a href="README_md.html#label-Usage">Usage</a>
|
53
|
+
<li><a href="README_md.html#label-Development">Development</a>
|
54
|
+
<li><a href="README_md.html#label-Contributing">Contributing</a>
|
55
|
+
<li><a href="README_md.html#label-License">License</a>
|
56
|
+
</ul>
|
57
|
+
</li>
|
58
|
+
<li class="file">
|
59
|
+
<a href="Rakefile.html">Rakefile</a>
|
60
|
+
</li>
|
61
|
+
<li class="file">
|
62
|
+
<a href="bin/setup.html">setup</a>
|
63
|
+
</li>
|
64
|
+
<li class="file">
|
65
|
+
<a href="lpp_Grupo3_gemspec.html">lpp_Grupo3.gemspec</a>
|
66
|
+
</li>
|
67
|
+
|
68
|
+
</ul>
|
69
|
+
|
70
|
+
<h2 id="classes">Classes and Modules</h2>
|
71
|
+
<ul>
|
72
|
+
<li class="class">
|
73
|
+
<a href="Articulo.html">Articulo</a>
|
74
|
+
</li>
|
75
|
+
<li class="class">
|
76
|
+
<a href="Bibliografia.html">Bibliografia</a>
|
77
|
+
</li>
|
78
|
+
<li class="class">
|
79
|
+
<a href="Cita.html">Cita</a>
|
80
|
+
</li>
|
81
|
+
<li class="class">
|
82
|
+
<a href="CitaArticulo.html">CitaArticulo</a>
|
83
|
+
</li>
|
84
|
+
<li class="class">
|
85
|
+
<a href="CitaCapitulo.html">CitaCapitulo</a>
|
86
|
+
</li>
|
87
|
+
<li class="class">
|
88
|
+
<a href="CitaEdoc.html">CitaEdoc</a>
|
89
|
+
</li>
|
90
|
+
<li class="class">
|
91
|
+
<a href="CitaLibro.html">CitaLibro</a>
|
92
|
+
</li>
|
93
|
+
<li class="class">
|
94
|
+
<a href="Citayanoexiste.html">Citayanoexiste</a>
|
95
|
+
</li>
|
96
|
+
<li class="class">
|
97
|
+
<a href="G03ref.html">G03ref</a>
|
98
|
+
</li>
|
99
|
+
<li class="class">
|
100
|
+
<a href="Libro.html">Libro</a>
|
101
|
+
</li>
|
102
|
+
<li class="class">
|
103
|
+
<a href="List.html">List</a>
|
104
|
+
</li>
|
105
|
+
<li class="module">
|
106
|
+
<a href="LppGrupo3.html">LppGrupo3</a>
|
107
|
+
</li>
|
108
|
+
<li class="module">
|
109
|
+
<a href="Lpp_Grupo3.html">Lpp_Grupo3</a>
|
110
|
+
</li>
|
111
|
+
<li class="class">
|
112
|
+
<a href="Object.html">Object</a>
|
113
|
+
</li>
|
114
|
+
</ul>
|
115
|
+
|
116
|
+
<h2 id="methods">Methods</h2>
|
117
|
+
<ul>
|
118
|
+
|
119
|
+
<li class="method">
|
120
|
+
<a href="Bibliografia.html#method-c-new">::new</a>
|
121
|
+
—
|
122
|
+
<span class="container">Bibliografia</span>
|
123
|
+
|
124
|
+
<li class="method">
|
125
|
+
<a href="Cita.html#method-c-new">::new</a>
|
126
|
+
—
|
127
|
+
<span class="container">Cita</span>
|
128
|
+
|
129
|
+
<li class="method">
|
130
|
+
<a href="CitaLibro.html#method-c-new">::new</a>
|
131
|
+
—
|
132
|
+
<span class="container">CitaLibro</span>
|
133
|
+
|
134
|
+
<li class="method">
|
135
|
+
<a href="CitaCapitulo.html#method-c-new">::new</a>
|
136
|
+
—
|
137
|
+
<span class="container">CitaCapitulo</span>
|
138
|
+
|
139
|
+
<li class="method">
|
140
|
+
<a href="CitaArticulo.html#method-c-new">::new</a>
|
141
|
+
—
|
142
|
+
<span class="container">CitaArticulo</span>
|
143
|
+
|
144
|
+
<li class="method">
|
145
|
+
<a href="CitaEdoc.html#method-c-new">::new</a>
|
146
|
+
—
|
147
|
+
<span class="container">CitaEdoc</span>
|
148
|
+
|
149
|
+
<li class="method">
|
150
|
+
<a href="List.html#method-c-new">::new</a>
|
151
|
+
—
|
152
|
+
<span class="container">List</span>
|
153
|
+
|
154
|
+
<li class="method">
|
155
|
+
<a href="G03ref.html#method-c-new">::new</a>
|
156
|
+
—
|
157
|
+
<span class="container">G03ref</span>
|
158
|
+
|
159
|
+
<li class="method">
|
160
|
+
<a href="Libro.html#method-c-new">::new</a>
|
161
|
+
—
|
162
|
+
<span class="container">Libro</span>
|
163
|
+
|
164
|
+
<li class="method">
|
165
|
+
<a href="Articulo.html#method-c-new">::new</a>
|
166
|
+
—
|
167
|
+
<span class="container">Articulo</span>
|
168
|
+
|
169
|
+
<li class="method">
|
170
|
+
<a href="Object.html#method-i-3C-3D-3E">#<=></a>
|
171
|
+
—
|
172
|
+
<span class="container">Object</span>
|
173
|
+
|
174
|
+
<li class="method">
|
175
|
+
<a href="Cita.html#method-i-3C-3D-3E">#<=></a>
|
176
|
+
—
|
177
|
+
<span class="container">Cita</span>
|
178
|
+
|
179
|
+
<li class="method">
|
180
|
+
<a href="G03ref.html#method-i-3C-3D-3E">#<=></a>
|
181
|
+
—
|
182
|
+
<span class="container">G03ref</span>
|
183
|
+
|
184
|
+
<li class="method">
|
185
|
+
<a href="CitaArticulo.html#method-i-articulo">#articulo</a>
|
186
|
+
—
|
187
|
+
<span class="container">CitaArticulo</span>
|
188
|
+
|
189
|
+
<li class="method">
|
190
|
+
<a href="Cita.html#method-i-autor">#autor</a>
|
191
|
+
—
|
192
|
+
<span class="container">Cita</span>
|
193
|
+
|
194
|
+
<li class="method">
|
195
|
+
<a href="CitaCapitulo.html#method-i-capitulo">#capitulo</a>
|
196
|
+
—
|
197
|
+
<span class="container">CitaCapitulo</span>
|
198
|
+
|
199
|
+
<li class="method">
|
200
|
+
<a href="List.html#method-i-dequeque">#dequeque</a>
|
201
|
+
—
|
202
|
+
<span class="container">List</span>
|
203
|
+
|
204
|
+
<li class="method">
|
205
|
+
<a href="List.html#method-i-each">#each</a>
|
206
|
+
—
|
207
|
+
<span class="container">List</span>
|
208
|
+
|
209
|
+
<li class="method">
|
210
|
+
<a href="CitaEdoc.html#method-i-edoc">#edoc</a>
|
211
|
+
—
|
212
|
+
<span class="container">CitaEdoc</span>
|
213
|
+
|
214
|
+
<li class="method">
|
215
|
+
<a href="List.html#method-i-enqueque">#enqueque</a>
|
216
|
+
—
|
217
|
+
<span class="container">List</span>
|
218
|
+
|
219
|
+
<li class="method">
|
220
|
+
<a href="Cita.html#method-i-fecha">#fecha</a>
|
221
|
+
—
|
222
|
+
<span class="container">Cita</span>
|
223
|
+
|
224
|
+
<li class="method">
|
225
|
+
<a href="G03ref.html#method-i-get_authors">#get_authors</a>
|
226
|
+
—
|
227
|
+
<span class="container">G03ref</span>
|
228
|
+
|
229
|
+
<li class="method">
|
230
|
+
<a href="G03ref.html#method-i-get_date">#get_date</a>
|
231
|
+
—
|
232
|
+
<span class="container">G03ref</span>
|
233
|
+
|
234
|
+
<li class="method">
|
235
|
+
<a href="Libro.html#method-i-get_edition">#get_edition</a>
|
236
|
+
—
|
237
|
+
<span class="container">Libro</span>
|
238
|
+
|
239
|
+
<li class="method">
|
240
|
+
<a href="Libro.html#method-i-get_editorial">#get_editorial</a>
|
241
|
+
—
|
242
|
+
<span class="container">Libro</span>
|
243
|
+
|
244
|
+
<li class="method">
|
245
|
+
<a href="Libro.html#method-i-get_isbn">#get_isbn</a>
|
246
|
+
—
|
247
|
+
<span class="container">Libro</span>
|
248
|
+
|
249
|
+
<li class="method">
|
250
|
+
<a href="Articulo.html#method-i-get_medio">#get_medio</a>
|
251
|
+
—
|
252
|
+
<span class="container">Articulo</span>
|
253
|
+
|
254
|
+
<li class="method">
|
255
|
+
<a href="Articulo.html#method-i-get_nmedio">#get_nmedio</a>
|
256
|
+
—
|
257
|
+
<span class="container">Articulo</span>
|
258
|
+
|
259
|
+
<li class="method">
|
260
|
+
<a href="Libro.html#method-i-get_serie">#get_serie</a>
|
261
|
+
—
|
262
|
+
<span class="container">Libro</span>
|
263
|
+
|
264
|
+
<li class="method">
|
265
|
+
<a href="G03ref.html#method-i-get_title">#get_title</a>
|
266
|
+
—
|
267
|
+
<span class="container">G03ref</span>
|
268
|
+
|
269
|
+
<li class="method">
|
270
|
+
<a href="Bibliografia.html#method-i-insertar">#insertar</a>
|
271
|
+
—
|
272
|
+
<span class="container">Bibliografia</span>
|
273
|
+
|
274
|
+
<li class="method">
|
275
|
+
<a href="List.html#method-i-insertar">#insertar</a>
|
276
|
+
—
|
277
|
+
<span class="container">List</span>
|
278
|
+
|
279
|
+
<li class="method">
|
280
|
+
<a href="CitaLibro.html#method-i-libro">#libro</a>
|
281
|
+
—
|
282
|
+
<span class="container">CitaLibro</span>
|
283
|
+
|
284
|
+
<li class="method">
|
285
|
+
<a href="Bibliografia.html#method-i-sufijos">#sufijos</a>
|
286
|
+
—
|
287
|
+
<span class="container">Bibliografia</span>
|
288
|
+
|
289
|
+
<li class="method">
|
290
|
+
<a href="Bibliografia.html#method-i-to_s">#to_s</a>
|
291
|
+
—
|
292
|
+
<span class="container">Bibliografia</span>
|
293
|
+
|
294
|
+
<li class="method">
|
295
|
+
<a href="CitaLibro.html#method-i-to_s">#to_s</a>
|
296
|
+
—
|
297
|
+
<span class="container">CitaLibro</span>
|
298
|
+
|
299
|
+
<li class="method">
|
300
|
+
<a href="CitaCapitulo.html#method-i-to_s">#to_s</a>
|
301
|
+
—
|
302
|
+
<span class="container">CitaCapitulo</span>
|
303
|
+
|
304
|
+
<li class="method">
|
305
|
+
<a href="CitaArticulo.html#method-i-to_s">#to_s</a>
|
306
|
+
—
|
307
|
+
<span class="container">CitaArticulo</span>
|
308
|
+
|
309
|
+
<li class="method">
|
310
|
+
<a href="CitaEdoc.html#method-i-to_s">#to_s</a>
|
311
|
+
—
|
312
|
+
<span class="container">CitaEdoc</span>
|
313
|
+
|
314
|
+
<li class="method">
|
315
|
+
<a href="Libro.html#method-i-to_s">#to_s</a>
|
316
|
+
—
|
317
|
+
<span class="container">Libro</span>
|
318
|
+
|
319
|
+
<li class="method">
|
320
|
+
<a href="Articulo.html#method-i-to_s">#to_s</a>
|
321
|
+
—
|
322
|
+
<span class="container">Articulo</span>
|
323
|
+
</ul>
|
324
|
+
</main>
|
325
|
+
|
326
|
+
|
327
|
+
<footer id="validator-badges" role="contentinfo">
|
328
|
+
<p><a href="http://validator.w3.org/check/referer">Validate</a>
|
329
|
+
<p>Generated by <a href="http://docs.seattlerb.org/rdoc/">RDoc</a> 4.2.0.
|
330
|
+
<p>Based on <a href="http://deveiate.org/projects/Darkfish-RDoc/">Darkfish</a> by <a href="http://deveiate.org">Michael Granger</a>.
|
331
|
+
</footer>
|
332
|
+
|
data/lib/lpp_Grupo3.rb
ADDED
@@ -0,0 +1,38 @@
|
|
1
|
+
require "lpp_Grupo3/version"
|
2
|
+
require "lpp_Grupo3/cita"
|
3
|
+
require "lpp_Grupo3/list"
|
4
|
+
class Bibliografia
|
5
|
+
attr_accessor :lista
|
6
|
+
def initialize(referencias)
|
7
|
+
@lista=List.new(referencias.sort)
|
8
|
+
@suf=0
|
9
|
+
self.sufijos
|
10
|
+
end
|
11
|
+
def insertar(nodos)
|
12
|
+
@lista.enqueque(nodos)
|
13
|
+
@lista=List.new(@lista.sort)
|
14
|
+
@suf=0
|
15
|
+
self.sufijos
|
16
|
+
end
|
17
|
+
def to_s
|
18
|
+
(@lista.sort.map{|referencias|referencias.to_s}).join("\n")
|
19
|
+
end
|
20
|
+
|
21
|
+
def sufijos
|
22
|
+
listaord = @lista.sort
|
23
|
+
for i in (0..listaord.size-1)
|
24
|
+
|
25
|
+
listaord[i].sufijo=0
|
26
|
+
|
27
|
+
end
|
28
|
+
for i in (0..listaord.size-2)
|
29
|
+
if (listaord[i].author==listaord[i+1].author&&listaord[i].datey==listaord[i+1].datey)
|
30
|
+
listaord[i].sufijo=@suf+1
|
31
|
+
listaord[i+1].sufijo=@suf+2
|
32
|
+
@suf=@suf+1
|
33
|
+
else
|
34
|
+
@suf=0
|
35
|
+
end
|
36
|
+
end
|
37
|
+
end
|
38
|
+
end
|
@@ -0,0 +1,232 @@
|
|
1
|
+
require "lpp_Grupo3/version"
|
2
|
+
require "lpp_Grupo3/reference"
|
3
|
+
class Cita
|
4
|
+
include Comparable
|
5
|
+
attr_accessor :author, :datey, :titulo, :sufijo
|
6
|
+
def initialize(author, date, titulo)
|
7
|
+
self.author=author
|
8
|
+
self.datey=date
|
9
|
+
self.titulo=titulo
|
10
|
+
self.sufijo=0
|
11
|
+
end
|
12
|
+
|
13
|
+
def initialize
|
14
|
+
self.author=[]
|
15
|
+
self.datey=[]
|
16
|
+
self.titulo=[]
|
17
|
+
self.sufijo=0
|
18
|
+
end
|
19
|
+
|
20
|
+
def autor (datos = {})
|
21
|
+
self.author.push([datos[:apellido], datos[:nombre]])
|
22
|
+
end
|
23
|
+
|
24
|
+
def fecha (year)
|
25
|
+
self.datey = year
|
26
|
+
end
|
27
|
+
|
28
|
+
def <=>(other)
|
29
|
+
if author == other.author
|
30
|
+
if datey == other.datey
|
31
|
+
titulo<=>other.titulo
|
32
|
+
else
|
33
|
+
datey <=> other.datey
|
34
|
+
end
|
35
|
+
else
|
36
|
+
author<=>other.author
|
37
|
+
end
|
38
|
+
end
|
39
|
+
|
40
|
+
end
|
41
|
+
|
42
|
+
class CitaLibro < Cita
|
43
|
+
attr_accessor :title, :subtitle, :editor, :edicion, :volumen
|
44
|
+
def initialize(author, date, titulo, subtitulo, editor, edicion, volumen)
|
45
|
+
super(author, date, titulo)
|
46
|
+
self.title=titulo
|
47
|
+
self.subtitle=subtitulo
|
48
|
+
self.editor=editor
|
49
|
+
self.edicion=edicion
|
50
|
+
self.volumen=volumen
|
51
|
+
end
|
52
|
+
|
53
|
+
def libro (datos = {})
|
54
|
+
self.titulo = datos[:titulo]
|
55
|
+
self.title = datos[:titulo]
|
56
|
+
self.subtitle = datos[:subtitulo]
|
57
|
+
self.editor = datos[:editor]
|
58
|
+
self.edicion = datos[:edicion]
|
59
|
+
self.volumen = datos[:volumen]
|
60
|
+
end
|
61
|
+
|
62
|
+
def initialize(&block)
|
63
|
+
super
|
64
|
+
self.title=[]
|
65
|
+
self.subtitle=[]
|
66
|
+
self.editor=[]
|
67
|
+
self.edicion=[]
|
68
|
+
self.volumen=[]
|
69
|
+
instance_eval &block if block_given?
|
70
|
+
end
|
71
|
+
|
72
|
+
def to_s
|
73
|
+
text=""
|
74
|
+
for i in (0..author.size-2)
|
75
|
+
text << " #{self.author[i][0]}, #{(self.author[i][1])[0]}. &"
|
76
|
+
end
|
77
|
+
text << " #{self.author[author.size-1][0]}, #{(self.author[self.author.size-1][1])[0]}."
|
78
|
+
text << " (#{self.datey}"
|
79
|
+
if (self.sufijo>0)
|
80
|
+
text << (self.sufijo+96).chr
|
81
|
+
end
|
82
|
+
text << "). #{self.title}: "
|
83
|
+
text << " #{self.subtitle}."
|
84
|
+
text << " (#{self.edicion}) "
|
85
|
+
text << " (#{self.volumen})."
|
86
|
+
text << " #{self.editor}."
|
87
|
+
text
|
88
|
+
end
|
89
|
+
|
90
|
+
end
|
91
|
+
|
92
|
+
class CitaCapitulo < Cita
|
93
|
+
attr_accessor :title, :subtitle, :editor, :edicion, :volumen
|
94
|
+
def initialize(author, date, titulocap, titulo, subtitulo, editor, edicion, volumen)
|
95
|
+
super(author, date, titulocap)
|
96
|
+
self.title=titulo
|
97
|
+
self.subtitle=subtitulo
|
98
|
+
self.editor=editor
|
99
|
+
self.edicion=edicion
|
100
|
+
self.volumen=volumen
|
101
|
+
end
|
102
|
+
|
103
|
+
def capitulo (datos = {})
|
104
|
+
self.title = datos[:titulo]
|
105
|
+
self.titulo = datos[:capitulo]
|
106
|
+
self.subtitle = datos[:subtitulo]
|
107
|
+
self.editor = datos[:editor]
|
108
|
+
self.edicion = datos[:edicion]
|
109
|
+
self.volumen = datos[:volumen]
|
110
|
+
end
|
111
|
+
|
112
|
+
def initialize(&block)
|
113
|
+
super
|
114
|
+
self.title=[]
|
115
|
+
self.subtitle=[]
|
116
|
+
self.editor=[]
|
117
|
+
self.edicion=[]
|
118
|
+
self.volumen=[]
|
119
|
+
instance_eval &block if block_given?
|
120
|
+
end
|
121
|
+
|
122
|
+
def to_s
|
123
|
+
text=""
|
124
|
+
for i in (0..author.size-2)
|
125
|
+
text << " #{self.author[i][0]}, #{(self.author[i][1])[0]}. &"
|
126
|
+
end
|
127
|
+
text << " #{self.author[author.size-1][0]}, #{(self.author[self.author.size-1][1])[0]}."
|
128
|
+
text << " (#{self.datey}"
|
129
|
+
if (self.sufijo>0)
|
130
|
+
text << (self.sufijo+96).chr
|
131
|
+
end
|
132
|
+
text << "). #{self.titulo}. "
|
133
|
+
text << "#{self.title}. "
|
134
|
+
text << "(#{self.edicion}) "
|
135
|
+
text << "(#{self.volumen})."
|
136
|
+
text << "#{self.editor}."
|
137
|
+
text
|
138
|
+
end
|
139
|
+
|
140
|
+
|
141
|
+
|
142
|
+
end
|
143
|
+
|
144
|
+
class CitaArticulo < Cita
|
145
|
+
attr_accessor :medio, :paginas
|
146
|
+
def initialize(author, date, articulo, medio, pagina)
|
147
|
+
super(author,date, articulo)
|
148
|
+
self.medio=(medio.split.map{|palabra| palabra.capitalize}).join(" ")
|
149
|
+
self.paginas=pagina
|
150
|
+
end
|
151
|
+
|
152
|
+
def articulo(datos = {})
|
153
|
+
self.titulo=datos[:titulo]
|
154
|
+
self.medio=datos[:medio]
|
155
|
+
self.paginas=datos[:pagina]
|
156
|
+
end
|
157
|
+
|
158
|
+
def initialize(&block)
|
159
|
+
super
|
160
|
+
self.medio=[]
|
161
|
+
self.paginas=[]
|
162
|
+
instance_eval &block if block_given?
|
163
|
+
end
|
164
|
+
|
165
|
+
def to_s
|
166
|
+
text=""
|
167
|
+
for i in (0..author.size-2)
|
168
|
+
text << " #{self.author[i][0]}, #{(self.author[i][1])[0]}. &"
|
169
|
+
end
|
170
|
+
text << " #{self.author[self.author.size-1][0]}, #{(self.author[author.size-1][1])[0]}."
|
171
|
+
text << " (#{self.datey}"
|
172
|
+
if (self.sufijo>0)
|
173
|
+
text << (self.sufijo+96).chr
|
174
|
+
end
|
175
|
+
text << "). #{self.titulo}."
|
176
|
+
text << " #{self.medio}."
|
177
|
+
text << " (pag.:#{self.paginas})."
|
178
|
+
text
|
179
|
+
end
|
180
|
+
end
|
181
|
+
|
182
|
+
class CitaEdoc < Cita
|
183
|
+
attr_accessor :edicion, :tipomedio, :editor, :enlace, :acceso
|
184
|
+
def initialize(author, date, titulo, edicion, tipomedio, editorial, enlace,acceso)
|
185
|
+
super(author, date, titulo)
|
186
|
+
self.edicion=edicion
|
187
|
+
self.tipomedio=tipomedio
|
188
|
+
self.editor=editorial
|
189
|
+
self.enlace=enlace
|
190
|
+
self.acceso=acceso
|
191
|
+
end
|
192
|
+
|
193
|
+
def edoc(datos = {})
|
194
|
+
self.titulo=datos[:titulo]
|
195
|
+
self.edicion=datos[:edicion]
|
196
|
+
self.tipomedio=datos[:medio]
|
197
|
+
self.editor=datos[:editor]
|
198
|
+
self.enlace=datos[:enlace]
|
199
|
+
self.acceso=datos[:acceso]
|
200
|
+
end
|
201
|
+
|
202
|
+
def initialize(&block)
|
203
|
+
super
|
204
|
+
self.edicion=[]
|
205
|
+
self.tipomedio=[]
|
206
|
+
self.editor=[]
|
207
|
+
self.enlace=[]
|
208
|
+
self.acceso=[]
|
209
|
+
instance_eval &block if block_given?
|
210
|
+
end
|
211
|
+
|
212
|
+
def to_s
|
213
|
+
text=""
|
214
|
+
for i in (0..self.author.size-2)
|
215
|
+
text << " #{self.author[i][0]}, #{(self.author[i][1])[0]}. &"
|
216
|
+
end
|
217
|
+
text << " #{self.author[self.author.size-1][0]}, #{(self.author[self.author.size-1][1])[0]}."
|
218
|
+
text << " (#{self.datey}"
|
219
|
+
if (self.sufijo>0)
|
220
|
+
text << (self.sufijo+96).chr
|
221
|
+
end
|
222
|
+
text << "). #{self.titulo} "
|
223
|
+
text << "(#{self.edicion}). "
|
224
|
+
text << "[#{self.tipomedio}]."
|
225
|
+
text << " #{self.editor}. "
|
226
|
+
text << "#{self.enlace}. "
|
227
|
+
text << "[#{self.acceso}]."
|
228
|
+
text
|
229
|
+
end
|
230
|
+
end
|
231
|
+
|
232
|
+
|