lpp_Grupo3 0.1.0
Sign up to get free protection for your applications and to get access to all the features.
- 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,61 @@
|
|
1
|
+
require "lpp_Grupo3/version"
|
2
|
+
require "lpp_Grupo3/reference"
|
3
|
+
class List
|
4
|
+
include Enumerable
|
5
|
+
|
6
|
+
attr_accessor :head, :tail
|
7
|
+
|
8
|
+
def initialize(nodes)
|
9
|
+
@Node = Struct.new(:value, :siguiente, :anterior)
|
10
|
+
@head = nil
|
11
|
+
@tail = nil
|
12
|
+
@empty=true
|
13
|
+
@first=true
|
14
|
+
@lasteach = nil
|
15
|
+
enqueque(nodes)
|
16
|
+
end
|
17
|
+
def insertar(node)
|
18
|
+
if @empty == true
|
19
|
+
@estenodo = @Node.new(node,nil,nil)
|
20
|
+
@head=@estenodo
|
21
|
+
@tail=@estenodo
|
22
|
+
@empty=false
|
23
|
+
else
|
24
|
+
@estenodo = @Node.new(node,nil,@tail)
|
25
|
+
@tail[:siguiente]=@estenodo
|
26
|
+
@tail = @estenodo
|
27
|
+
end
|
28
|
+
end
|
29
|
+
def dequeque
|
30
|
+
if @head == @tail
|
31
|
+
nodo = @head[:value]
|
32
|
+
@head = nil
|
33
|
+
@tail = nil
|
34
|
+
@empty = true
|
35
|
+
else
|
36
|
+
nodo = @head[:value]
|
37
|
+
@head = @head[:siguiente]
|
38
|
+
@head[:anterior] = nil
|
39
|
+
end
|
40
|
+
nodo
|
41
|
+
end
|
42
|
+
def enqueque(nodo)
|
43
|
+
insertar(nodo)
|
44
|
+
end
|
45
|
+
def enqueque(nodes)
|
46
|
+
for i in (0.. nodes.size-1)
|
47
|
+
insertar(nodes[i])
|
48
|
+
end
|
49
|
+
end
|
50
|
+
def each
|
51
|
+
@lasteach=nil
|
52
|
+
while @lasteach != @tail
|
53
|
+
if @lasteach==nil
|
54
|
+
@lasteach=@head
|
55
|
+
else
|
56
|
+
@lasteach=@lasteach[:siguiente]
|
57
|
+
end
|
58
|
+
yield @lasteach[:value]
|
59
|
+
end
|
60
|
+
end
|
61
|
+
end
|
@@ -0,0 +1,110 @@
|
|
1
|
+
require "lpp_Grupo3/version"
|
2
|
+
class G03ref
|
3
|
+
include Comparable
|
4
|
+
attr_accessor :title,:serie,:editorial,:edicion,:date,:isbn,:authors
|
5
|
+
def initialize(authors,title,date)
|
6
|
+
self.authors = []
|
7
|
+
authors.each do |palabras|
|
8
|
+
@authors.push(palabras)
|
9
|
+
end
|
10
|
+
@title = title
|
11
|
+
@date = date
|
12
|
+
end
|
13
|
+
def get_authors
|
14
|
+
@authors
|
15
|
+
end
|
16
|
+
|
17
|
+
def get_title
|
18
|
+
@title
|
19
|
+
end
|
20
|
+
def get_date
|
21
|
+
@date
|
22
|
+
end
|
23
|
+
def <=>(other)
|
24
|
+
return nil unless other.is_a? G03ref
|
25
|
+
@title <=> other.title
|
26
|
+
end
|
27
|
+
end
|
28
|
+
|
29
|
+
class Libro < G03ref
|
30
|
+
public
|
31
|
+
# CONSTRUCTOR
|
32
|
+
def initialize(title,editorial,edicion,date,isbn,authors,*serie)
|
33
|
+
super(authors,title,date)
|
34
|
+
|
35
|
+
@serie = serie
|
36
|
+
@editorial = editorial
|
37
|
+
@edicion = edicion
|
38
|
+
|
39
|
+
self.isbn = []
|
40
|
+
isbn.each do |numeros|
|
41
|
+
@isbn.push(numeros)
|
42
|
+
end
|
43
|
+
return self
|
44
|
+
end
|
45
|
+
|
46
|
+
def get_serie
|
47
|
+
@serie
|
48
|
+
end
|
49
|
+
def get_editorial
|
50
|
+
@editorial
|
51
|
+
end
|
52
|
+
def get_edition
|
53
|
+
@edicion
|
54
|
+
end
|
55
|
+
|
56
|
+
def get_isbn
|
57
|
+
@isbn
|
58
|
+
end
|
59
|
+
def to_s
|
60
|
+
text=""
|
61
|
+
|
62
|
+
for i in (0..@authors.size-2)
|
63
|
+
text << "#{authors[i]} , "
|
64
|
+
end
|
65
|
+
text << "#{authors[authors.size-1]}."
|
66
|
+
text << "\n#{@title}."
|
67
|
+
if @serie.size==1
|
68
|
+
text << "\n(#{@serie[0]})."
|
69
|
+
end
|
70
|
+
text << "\n#{@editorial}; #{@edicion} Edicion (#{@date})."
|
71
|
+
for i in (0..@isbn.size-1)
|
72
|
+
text << "\nISBN #{@isbn[i].length}: #{@isbn[i]}."
|
73
|
+
end
|
74
|
+
text
|
75
|
+
end
|
76
|
+
|
77
|
+
end
|
78
|
+
class Articulo < G03ref
|
79
|
+
def initialize(title,medio,nmedio,date,authors)
|
80
|
+
super(authors,title,date)
|
81
|
+
|
82
|
+
@medio = medio
|
83
|
+
@nmedio = nmedio
|
84
|
+
|
85
|
+
return self
|
86
|
+
end
|
87
|
+
def get_medio
|
88
|
+
@medio
|
89
|
+
end
|
90
|
+
def get_nmedio
|
91
|
+
@nmedio
|
92
|
+
end
|
93
|
+
|
94
|
+
def to_s
|
95
|
+
text=""
|
96
|
+
for i in (0..@authors.size-2)
|
97
|
+
text << "#{authors[i]} , "
|
98
|
+
end
|
99
|
+
text << "#{authors[authors.size-1]}."
|
100
|
+
text << "\n#{@title}."
|
101
|
+
if @nmedio.size==1
|
102
|
+
text << "\n(#{@serie[0]})."
|
103
|
+
end
|
104
|
+
text << "\n#{@editorial}; #{@edicion} Edicion (#{@date})."
|
105
|
+
for i in (0..@isbn.size-1)
|
106
|
+
text << "\nISBN #{@isbn[i].length}: #{@isbn[i]}."
|
107
|
+
end
|
108
|
+
text
|
109
|
+
end
|
110
|
+
end
|
data/lpp_Grupo3.gemspec
ADDED
@@ -0,0 +1,37 @@
|
|
1
|
+
# coding: utf-8
|
2
|
+
lib = File.expand_path('../lib', __FILE__)
|
3
|
+
$LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)
|
4
|
+
require 'lpp_Grupo3/version'
|
5
|
+
|
6
|
+
Gem::Specification.new do |spec|
|
7
|
+
spec.name = "lpp_Grupo3"
|
8
|
+
spec.version = LppGrupo3::VERSION
|
9
|
+
spec.authors = ["Rubén Labrador"]
|
10
|
+
spec.email = ["rubenlabradorpaez@gmail.com"]
|
11
|
+
|
12
|
+
spec.summary = "Sumario"
|
13
|
+
spec.description =
|
14
|
+
spec.homepage = "https://github.com/alu0100309553/pract11.git"
|
15
|
+
spec.license = "MIT"
|
16
|
+
|
17
|
+
# Prevent pushing this gem to RubyGems.org by setting 'allowed_push_host', or
|
18
|
+
# delete this section to allow pushing this gem to any host.
|
19
|
+
if spec.respond_to?(:metadata)
|
20
|
+
spec.metadata['allowed_push_host'] = "https://rubygems.org"
|
21
|
+
else
|
22
|
+
raise "RubyGems 2.0 or newer is required to protect against public gem pushes."
|
23
|
+
end
|
24
|
+
|
25
|
+
spec.files = `git ls-files -z`.split("\x0").reject { |f| f.match(%r{^(test|spec|features)/}) }
|
26
|
+
spec.bindir = "exe"
|
27
|
+
spec.executables = spec.files.grep(%r{^exe/}) { |f| File.basename(f) }
|
28
|
+
spec.require_paths = ["lib"]
|
29
|
+
|
30
|
+
spec.add_development_dependency "bundler", "~> 1.10"
|
31
|
+
spec.add_development_dependency "rake", "~> 10.0"
|
32
|
+
spec.add_development_dependency "rspec", "~> 2.11"
|
33
|
+
spec.add_development_dependency "guard"
|
34
|
+
spec.add_development_dependency "guard-rspec"
|
35
|
+
spec.add_development_dependency "guard-bundler"
|
36
|
+
spec.add_development_dependency "coveralls"
|
37
|
+
end
|
metadata
ADDED
@@ -0,0 +1,232 @@
|
|
1
|
+
--- !ruby/object:Gem::Specification
|
2
|
+
name: lpp_Grupo3
|
3
|
+
version: !ruby/object:Gem::Version
|
4
|
+
version: 0.1.0
|
5
|
+
platform: ruby
|
6
|
+
authors:
|
7
|
+
- Rubén Labrador
|
8
|
+
autorequire:
|
9
|
+
bindir: exe
|
10
|
+
cert_chain: []
|
11
|
+
date: 2015-12-17 00:00:00.000000000 Z
|
12
|
+
dependencies:
|
13
|
+
- !ruby/object:Gem::Dependency
|
14
|
+
name: bundler
|
15
|
+
requirement: !ruby/object:Gem::Requirement
|
16
|
+
requirements:
|
17
|
+
- - "~>"
|
18
|
+
- !ruby/object:Gem::Version
|
19
|
+
version: '1.10'
|
20
|
+
type: :development
|
21
|
+
prerelease: false
|
22
|
+
version_requirements: !ruby/object:Gem::Requirement
|
23
|
+
requirements:
|
24
|
+
- - "~>"
|
25
|
+
- !ruby/object:Gem::Version
|
26
|
+
version: '1.10'
|
27
|
+
- !ruby/object:Gem::Dependency
|
28
|
+
name: rake
|
29
|
+
requirement: !ruby/object:Gem::Requirement
|
30
|
+
requirements:
|
31
|
+
- - "~>"
|
32
|
+
- !ruby/object:Gem::Version
|
33
|
+
version: '10.0'
|
34
|
+
type: :development
|
35
|
+
prerelease: false
|
36
|
+
version_requirements: !ruby/object:Gem::Requirement
|
37
|
+
requirements:
|
38
|
+
- - "~>"
|
39
|
+
- !ruby/object:Gem::Version
|
40
|
+
version: '10.0'
|
41
|
+
- !ruby/object:Gem::Dependency
|
42
|
+
name: rspec
|
43
|
+
requirement: !ruby/object:Gem::Requirement
|
44
|
+
requirements:
|
45
|
+
- - "~>"
|
46
|
+
- !ruby/object:Gem::Version
|
47
|
+
version: '2.11'
|
48
|
+
type: :development
|
49
|
+
prerelease: false
|
50
|
+
version_requirements: !ruby/object:Gem::Requirement
|
51
|
+
requirements:
|
52
|
+
- - "~>"
|
53
|
+
- !ruby/object:Gem::Version
|
54
|
+
version: '2.11'
|
55
|
+
- !ruby/object:Gem::Dependency
|
56
|
+
name: guard
|
57
|
+
requirement: !ruby/object:Gem::Requirement
|
58
|
+
requirements:
|
59
|
+
- - ">="
|
60
|
+
- !ruby/object:Gem::Version
|
61
|
+
version: '0'
|
62
|
+
type: :development
|
63
|
+
prerelease: false
|
64
|
+
version_requirements: !ruby/object:Gem::Requirement
|
65
|
+
requirements:
|
66
|
+
- - ">="
|
67
|
+
- !ruby/object:Gem::Version
|
68
|
+
version: '0'
|
69
|
+
- !ruby/object:Gem::Dependency
|
70
|
+
name: guard-rspec
|
71
|
+
requirement: !ruby/object:Gem::Requirement
|
72
|
+
requirements:
|
73
|
+
- - ">="
|
74
|
+
- !ruby/object:Gem::Version
|
75
|
+
version: '0'
|
76
|
+
type: :development
|
77
|
+
prerelease: false
|
78
|
+
version_requirements: !ruby/object:Gem::Requirement
|
79
|
+
requirements:
|
80
|
+
- - ">="
|
81
|
+
- !ruby/object:Gem::Version
|
82
|
+
version: '0'
|
83
|
+
- !ruby/object:Gem::Dependency
|
84
|
+
name: guard-bundler
|
85
|
+
requirement: !ruby/object:Gem::Requirement
|
86
|
+
requirements:
|
87
|
+
- - ">="
|
88
|
+
- !ruby/object:Gem::Version
|
89
|
+
version: '0'
|
90
|
+
type: :development
|
91
|
+
prerelease: false
|
92
|
+
version_requirements: !ruby/object:Gem::Requirement
|
93
|
+
requirements:
|
94
|
+
- - ">="
|
95
|
+
- !ruby/object:Gem::Version
|
96
|
+
version: '0'
|
97
|
+
- !ruby/object:Gem::Dependency
|
98
|
+
name: coveralls
|
99
|
+
requirement: !ruby/object:Gem::Requirement
|
100
|
+
requirements:
|
101
|
+
- - ">="
|
102
|
+
- !ruby/object:Gem::Version
|
103
|
+
version: '0'
|
104
|
+
type: :development
|
105
|
+
prerelease: false
|
106
|
+
version_requirements: !ruby/object:Gem::Requirement
|
107
|
+
requirements:
|
108
|
+
- - ">="
|
109
|
+
- !ruby/object:Gem::Version
|
110
|
+
version: '0'
|
111
|
+
description: https://github.com/alu0100309553/pract11.git
|
112
|
+
email:
|
113
|
+
- rubenlabradorpaez@gmail.com
|
114
|
+
executables: []
|
115
|
+
extensions: []
|
116
|
+
extra_rdoc_files: []
|
117
|
+
files:
|
118
|
+
- ".coveralls.yml"
|
119
|
+
- ".travis.yml"
|
120
|
+
- CODE_OF_CONDUCT.md
|
121
|
+
- Gemfile
|
122
|
+
- Gemfile.lock
|
123
|
+
- Guardfile
|
124
|
+
- LICENSE.txt
|
125
|
+
- README.md
|
126
|
+
- Rakefile
|
127
|
+
- bin/console
|
128
|
+
- bin/setup
|
129
|
+
- coverage/.last_run.json
|
130
|
+
- coverage/.resultset.json
|
131
|
+
- coverage/.resultset.json.lock
|
132
|
+
- doc/Articulo.html
|
133
|
+
- doc/Bibliografia.html
|
134
|
+
- doc/CODE_OF_CONDUCT_md.html
|
135
|
+
- doc/Cita.html
|
136
|
+
- doc/CitaArticulo.html
|
137
|
+
- doc/CitaCapitulo.html
|
138
|
+
- doc/CitaEdoc.html
|
139
|
+
- doc/CitaLibro.html
|
140
|
+
- doc/Citayanoexiste.html
|
141
|
+
- doc/G03ref.html
|
142
|
+
- doc/Gemfile.html
|
143
|
+
- doc/Gemfile_lock.html
|
144
|
+
- doc/Guardfile.html
|
145
|
+
- doc/LICENSE_txt.html
|
146
|
+
- doc/Libro.html
|
147
|
+
- doc/List.html
|
148
|
+
- doc/LppGrupo3.html
|
149
|
+
- doc/Lpp_Grupo3.html
|
150
|
+
- doc/Object.html
|
151
|
+
- doc/README_md.html
|
152
|
+
- doc/Rakefile.html
|
153
|
+
- doc/bin/setup.html
|
154
|
+
- doc/created.rid
|
155
|
+
- doc/css/fonts.css
|
156
|
+
- doc/css/rdoc.css
|
157
|
+
- doc/fonts/Lato-Light.ttf
|
158
|
+
- doc/fonts/Lato-LightItalic.ttf
|
159
|
+
- doc/fonts/Lato-Regular.ttf
|
160
|
+
- doc/fonts/Lato-RegularItalic.ttf
|
161
|
+
- doc/fonts/SourceCodePro-Bold.ttf
|
162
|
+
- doc/fonts/SourceCodePro-Regular.ttf
|
163
|
+
- doc/images/add.png
|
164
|
+
- doc/images/arrow_up.png
|
165
|
+
- doc/images/brick.png
|
166
|
+
- doc/images/brick_link.png
|
167
|
+
- doc/images/bug.png
|
168
|
+
- doc/images/bullet_black.png
|
169
|
+
- doc/images/bullet_toggle_minus.png
|
170
|
+
- doc/images/bullet_toggle_plus.png
|
171
|
+
- doc/images/date.png
|
172
|
+
- doc/images/delete.png
|
173
|
+
- doc/images/find.png
|
174
|
+
- doc/images/loadingAnimation.gif
|
175
|
+
- doc/images/macFFBgHack.png
|
176
|
+
- doc/images/package.png
|
177
|
+
- doc/images/page_green.png
|
178
|
+
- doc/images/page_white_text.png
|
179
|
+
- doc/images/page_white_width.png
|
180
|
+
- doc/images/plugin.png
|
181
|
+
- doc/images/ruby.png
|
182
|
+
- doc/images/tag_blue.png
|
183
|
+
- doc/images/tag_green.png
|
184
|
+
- doc/images/transparent.png
|
185
|
+
- doc/images/wrench.png
|
186
|
+
- doc/images/wrench_orange.png
|
187
|
+
- doc/images/zoom.png
|
188
|
+
- doc/index.html
|
189
|
+
- doc/js/darkfish.js
|
190
|
+
- doc/js/jquery.js
|
191
|
+
- doc/js/navigation.js
|
192
|
+
- doc/js/navigation.js.gz
|
193
|
+
- doc/js/search.js
|
194
|
+
- doc/js/search_index.js
|
195
|
+
- doc/js/search_index.js.gz
|
196
|
+
- doc/js/searcher.js
|
197
|
+
- doc/js/searcher.js.gz
|
198
|
+
- doc/lpp_Grupo3_gemspec.html
|
199
|
+
- doc/table_of_contents.html
|
200
|
+
- lib/lpp_Grupo3.rb
|
201
|
+
- lib/lpp_Grupo3/bibliografia.rb
|
202
|
+
- lib/lpp_Grupo3/cita.rb
|
203
|
+
- lib/lpp_Grupo3/list.rb
|
204
|
+
- lib/lpp_Grupo3/reference.rb
|
205
|
+
- lib/lpp_Grupo3/version.rb
|
206
|
+
- lpp_Grupo3.gemspec
|
207
|
+
homepage: https://github.com/alu0100309553/pract11.git
|
208
|
+
licenses:
|
209
|
+
- MIT
|
210
|
+
metadata:
|
211
|
+
allowed_push_host: https://rubygems.org
|
212
|
+
post_install_message:
|
213
|
+
rdoc_options: []
|
214
|
+
require_paths:
|
215
|
+
- lib
|
216
|
+
required_ruby_version: !ruby/object:Gem::Requirement
|
217
|
+
requirements:
|
218
|
+
- - ">="
|
219
|
+
- !ruby/object:Gem::Version
|
220
|
+
version: '0'
|
221
|
+
required_rubygems_version: !ruby/object:Gem::Requirement
|
222
|
+
requirements:
|
223
|
+
- - ">="
|
224
|
+
- !ruby/object:Gem::Version
|
225
|
+
version: '0'
|
226
|
+
requirements: []
|
227
|
+
rubyforge_project:
|
228
|
+
rubygems_version: 2.4.6
|
229
|
+
signing_key:
|
230
|
+
specification_version: 4
|
231
|
+
summary: Sumario
|
232
|
+
test_files: []
|