prct09 1.0.0 → 1.1.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +7 -0
- data/Rakefile +7 -2
- data/config/gemnasium.yml +10 -0
- data/doc/Fraccion.html +856 -0
- data/doc/Gemfile.html +280 -0
- data/doc/Guarfile.html +310 -0
- data/doc/LICENSE_txt.html +297 -0
- data/doc/Matriz.html +721 -0
- data/doc/Matriz_densa.html +605 -0
- data/doc/Matriz_dispersa.html +829 -0
- data/doc/Prct09.html +328 -0
- data/doc/Rakefile.html +318 -0
- data/doc/Test_Matriz.html +509 -0
- data/doc/bin/prct09.html +54 -0
- data/doc/classes/Fraccion.html +0 -0
- data/doc/classes/Fraccion.src/M000024.html +0 -0
- data/doc/classes/Fraccion.src/M000025.html +0 -0
- data/doc/classes/Fraccion.src/M000026.html +0 -0
- data/doc/classes/Fraccion.src/M000027.html +0 -0
- data/doc/classes/Fraccion.src/M000028.html +0 -0
- data/doc/classes/Fraccion.src/M000029.html +0 -0
- data/doc/classes/Fraccion.src/M000030.html +0 -0
- data/doc/classes/Fraccion.src/M000031.html +0 -0
- data/doc/classes/Fraccion.src/M000032.html +0 -0
- data/doc/classes/Fraccion.src/M000033.html +0 -0
- data/doc/classes/Fraccion.src/M000034.html +0 -0
- data/doc/classes/Fraccion.src/M000035.html +0 -0
- data/doc/classes/Fraccion.src/M000036.html +0 -0
- data/doc/classes/Matriz.html +0 -0
- data/doc/classes/Matriz.src/M000015.html +0 -0
- data/doc/classes/Matriz.src/M000016.html +0 -0
- data/doc/classes/Matriz.src/M000017.html +0 -0
- data/doc/classes/Matriz.src/M000018.html +0 -0
- data/doc/classes/Matriz.src/M000019.html +0 -0
- data/doc/classes/Matriz.src/M000020.html +0 -0
- data/doc/classes/Matriz.src/M000021.html +0 -0
- data/doc/classes/Matriz.src/M000022.html +0 -0
- data/doc/classes/Matriz.src/M000023.html +0 -0
- data/doc/classes/Matriz_densa.html +0 -0
- data/doc/classes/Matriz_densa.src/M000010.html +0 -0
- data/doc/classes/Matriz_densa.src/M000011.html +0 -0
- data/doc/classes/Matriz_densa.src/M000012.html +0 -0
- data/doc/classes/Matriz_densa.src/M000013.html +0 -0
- data/doc/classes/Matriz_densa.src/M000014.html +0 -0
- data/doc/classes/Matriz_dispersa.html +0 -0
- data/doc/classes/Matriz_dispersa.src/M000002.html +0 -0
- data/doc/classes/Matriz_dispersa.src/M000003.html +0 -0
- data/doc/classes/Matriz_dispersa.src/M000004.html +0 -0
- data/doc/classes/Matriz_dispersa.src/M000005.html +0 -0
- data/doc/classes/Matriz_dispersa.src/M000006.html +0 -0
- data/doc/classes/Matriz_dispersa.src/M000007.html +0 -0
- data/doc/classes/Matriz_dispersa.src/M000008.html +0 -0
- data/doc/classes/Matriz_dispersa.src/M000009.html +0 -0
- data/doc/classes/Prct09.html +0 -0
- data/doc/classes/Test_Matriz.html +0 -0
- data/doc/classes/Test_Matriz.src/M000037.html +0 -0
- data/doc/classes/Test_Matriz.src/M000038.html +0 -0
- data/doc/classes/Test_Matriz.src/M000039.html +0 -0
- data/doc/classes/Test_Matriz.src/M000040.html +0 -0
- data/doc/created.rid +125 -14
- data/doc/files/lib/Fraccion_rb.html +0 -0
- data/doc/files/lib/Matriz_densa_rb.html +0 -0
- data/doc/files/lib/Matriz_dispersa_rb.html +0 -0
- data/doc/files/lib/Matriz_rb.html +0 -0
- data/doc/files/lib/mcd_rb.html +0 -0
- data/doc/files/lib/mcd_rb.src/M000001.html +0 -0
- data/doc/files/lib/prct09/version_rb.html +0 -0
- data/doc/files/lib/prct09_rb.html +0 -0
- data/doc/files/spec/Matriz_spec_rb.html +0 -0
- data/doc/files/test/tc_matriz_rb.html +0 -0
- data/doc/fr_class_index.html +0 -0
- data/doc/fr_file_index.html +0 -0
- data/doc/fr_method_index.html +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/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_green.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 +254 -132
- data/doc/js/darkfish.js +155 -0
- data/doc/js/jquery.js +18 -0
- data/doc/js/quicksearch.js +114 -0
- data/doc/js/thickbox-compressed.js +10 -0
- data/doc/lib/Fraccion_rb.html +52 -0
- data/doc/lib/Matriz_densa_rb.html +56 -0
- data/doc/lib/Matriz_dispersa_rb.html +56 -0
- data/doc/lib/Matriz_rb.html +54 -0
- data/doc/lib/prct09/version_rb.html +52 -0
- data/doc/lib/prct09_rb.html +54 -0
- data/doc/rdoc-style.css +0 -0
- data/doc/rdoc.css +595 -0
- data/doc/spec/Matriz_spec_rb.html +62 -0
- data/doc/test/tc_matriz_rb.html +62 -0
- data/lib/Dsl.rb +82 -0
- data/lib/prct09/version.rb +1 -1
- data/prct09-1.0.0.gem +0 -0
- data/prct09.gemspec +1 -1
- data/spec/Dsl_spec.rb +92 -0
- metadata +66 -29
- data/prct09-0.0.1.gem +0 -0
checksums.yaml
ADDED
@@ -0,0 +1,7 @@
|
|
1
|
+
---
|
2
|
+
SHA1:
|
3
|
+
metadata.gz: ec83ea249e98e5013827be6fd82b2bab3f7404c7
|
4
|
+
data.tar.gz: bca88674660324ef678fa712e9638a4be4e1abb0
|
5
|
+
SHA512:
|
6
|
+
metadata.gz: b4fe8786aacbd34c2d7a38677a1adc7addf1709eab97bb986d6938d8744b411bb2e441bdb6edbb6c6c82bb93ff316924f100a26aea8129995ad14ee738ac3541
|
7
|
+
data.tar.gz: ae0acb09725aca60ceb97944b12558cfbcef4b20ff1e0454e90f15a5cde5d5d21ba562a42451d417537236e439daca7090b13bf280532cab2633d690c837ac1a
|
data/Rakefile
CHANGED
@@ -24,6 +24,11 @@ desc "Ejecutar test con formato html"
|
|
24
24
|
end
|
25
25
|
|
26
26
|
desc "Test Unitarios"
|
27
|
-
|
28
|
-
|
27
|
+
task :test do
|
28
|
+
sh "ruby -Ilib test/tc_matriz.rb"
|
29
|
+
end
|
30
|
+
|
31
|
+
desc "spec dsl con --format documentation"
|
32
|
+
task :dsl do
|
33
|
+
sh "rspec spec/Dsl_spec.rb --format documentation"
|
29
34
|
end
|
@@ -0,0 +1,10 @@
|
|
1
|
+
api_key: 950ee9db15e61b0adf48050895d830e7 # You personal (secret) API key. Get it at https://gemnasium.com/settings/api_access
|
2
|
+
profile_name: alu0100683578 # One of https://gemnasium.com/settings/github_setup
|
3
|
+
project_name: prct12 # Will be available at https://gemnasium.com/profile_name/project_name
|
4
|
+
project_branch: master # /!\ If you don't use git, remove this line
|
5
|
+
ignored_paths: # Paths you want to ignore when searching for dependency files (from app root)
|
6
|
+
- features/
|
7
|
+
- spec/
|
8
|
+
- test/
|
9
|
+
- tmp/
|
10
|
+
- vendor/
|
data/doc/Fraccion.html
ADDED
@@ -0,0 +1,856 @@
|
|
1
|
+
<!DOCTYPE html>
|
2
|
+
|
3
|
+
<html>
|
4
|
+
<head>
|
5
|
+
<meta content="text/html; charset=UTF-8" http-equiv="Content-Type">
|
6
|
+
|
7
|
+
<title>class Fraccion - RDoc Documentation</title>
|
8
|
+
|
9
|
+
<link type="text/css" media="screen" href="./rdoc.css" rel="stylesheet">
|
10
|
+
|
11
|
+
<script type="text/javascript">
|
12
|
+
var rdoc_rel_prefix = "./";
|
13
|
+
</script>
|
14
|
+
|
15
|
+
<script type="text/javascript" charset="utf-8" src="./js/jquery.js"></script>
|
16
|
+
<script type="text/javascript" charset="utf-8" src="./js/navigation.js"></script>
|
17
|
+
<script type="text/javascript" charset="utf-8" src="./js/search_index.js"></script>
|
18
|
+
<script type="text/javascript" charset="utf-8" src="./js/search.js"></script>
|
19
|
+
<script type="text/javascript" charset="utf-8" src="./js/searcher.js"></script>
|
20
|
+
<script type="text/javascript" charset="utf-8" src="./js/darkfish.js"></script>
|
21
|
+
|
22
|
+
|
23
|
+
<body id="top" class="class">
|
24
|
+
<nav id="metadata">
|
25
|
+
<nav id="home-section" class="section">
|
26
|
+
<h3 class="section-header">
|
27
|
+
<a href="./index.html">Home</a>
|
28
|
+
<a href="./table_of_contents.html#classes">Classes</a>
|
29
|
+
<a href="./table_of_contents.html#methods">Methods</a>
|
30
|
+
</h3>
|
31
|
+
</nav>
|
32
|
+
|
33
|
+
|
34
|
+
<nav id="search-section" class="section project-section" class="initially-hidden">
|
35
|
+
<form action="#" method="get" accept-charset="utf-8">
|
36
|
+
<h3 class="section-header">
|
37
|
+
<input type="text" name="search" placeholder="Search" id="search-field"
|
38
|
+
title="Type to search, Up and Down to navigate, Enter to load">
|
39
|
+
</h3>
|
40
|
+
</form>
|
41
|
+
|
42
|
+
<ul id="search-results" class="initially-hidden"></ul>
|
43
|
+
</nav>
|
44
|
+
|
45
|
+
|
46
|
+
|
47
|
+
|
48
|
+
<div id="file-metadata">
|
49
|
+
<nav id="file-list-section" class="section">
|
50
|
+
<h3 class="section-header">Defined In</h3>
|
51
|
+
<ul>
|
52
|
+
<li>lib/Fraccion.rb
|
53
|
+
</ul>
|
54
|
+
</nav>
|
55
|
+
|
56
|
+
|
57
|
+
</div>
|
58
|
+
|
59
|
+
<div id="class-metadata">
|
60
|
+
|
61
|
+
<nav id="parent-class-section" class="section">
|
62
|
+
<h3 class="section-header">Parent</h3>
|
63
|
+
|
64
|
+
<p class="link">Object
|
65
|
+
|
66
|
+
</nav>
|
67
|
+
|
68
|
+
<!-- Included Modules -->
|
69
|
+
<nav id="includes-section" class="section">
|
70
|
+
<h3 class="section-header">Included Modules</h3>
|
71
|
+
|
72
|
+
<ul class="link-list">
|
73
|
+
|
74
|
+
|
75
|
+
<li><span class="include">Comparable</span>
|
76
|
+
|
77
|
+
|
78
|
+
</ul>
|
79
|
+
</nav>
|
80
|
+
|
81
|
+
|
82
|
+
<!-- Method Quickref -->
|
83
|
+
<nav id="method-list-section" class="section">
|
84
|
+
<h3 class="section-header">Methods</h3>
|
85
|
+
|
86
|
+
<ul class="link-list">
|
87
|
+
|
88
|
+
<li ><a href="#method-c-new">::new</a>
|
89
|
+
|
90
|
+
<li ><a href="#method-i-25">#%</a>
|
91
|
+
|
92
|
+
<li ><a href="#method-i-2A">#*</a>
|
93
|
+
|
94
|
+
<li ><a href="#method-i-2B">#+</a>
|
95
|
+
|
96
|
+
<li ><a href="#method-i-2D">#-</a>
|
97
|
+
|
98
|
+
<li ><a href="#method-i-2D-40">#-@</a>
|
99
|
+
|
100
|
+
<li ><a href="#method-i-2F">#/</a>
|
101
|
+
|
102
|
+
<li ><a href="#method-i-3C-3D-3E">#<=></a>
|
103
|
+
|
104
|
+
<li ><a href="#method-i-abs">#abs</a>
|
105
|
+
|
106
|
+
<li ><a href="#method-i-coerce">#coerce</a>
|
107
|
+
|
108
|
+
<li ><a href="#method-i-imprimirFlotante">#imprimirFlotante</a>
|
109
|
+
|
110
|
+
<li ><a href="#method-i-imprimirFraccion">#imprimirFraccion</a>
|
111
|
+
|
112
|
+
<li ><a href="#method-i-reciprocal">#reciprocal</a>
|
113
|
+
|
114
|
+
</ul>
|
115
|
+
</nav>
|
116
|
+
|
117
|
+
</div>
|
118
|
+
|
119
|
+
<div id="project-metadata">
|
120
|
+
<nav id="fileindex-section" class="section project-section">
|
121
|
+
<h3 class="section-header">Pages</h3>
|
122
|
+
|
123
|
+
<ul>
|
124
|
+
|
125
|
+
<li class="file"><a href="./Gemfile.html">Gemfile</a>
|
126
|
+
|
127
|
+
<li class="file"><a href="./Guarfile.html">Guarfile</a>
|
128
|
+
|
129
|
+
<li class="file"><a href="./LICENSE_txt.html">LICENSE</a>
|
130
|
+
|
131
|
+
<li class="file"><a href="./README_md.html">README</a>
|
132
|
+
|
133
|
+
<li class="file"><a href="./Rakefile.html">Rakefile</a>
|
134
|
+
|
135
|
+
<li class="file"><a href="./doc/Fraccion_html.html">Fraccion.html</a>
|
136
|
+
|
137
|
+
<li class="file"><a href="./doc/Gemfile_html.html">Gemfile.html</a>
|
138
|
+
|
139
|
+
<li class="file"><a href="./doc/Guarfile_html.html">Guarfile.html</a>
|
140
|
+
|
141
|
+
<li class="file"><a href="./doc/LICENSE_txt_html.html">LICENSE_txt.html</a>
|
142
|
+
|
143
|
+
<li class="file"><a href="./doc/Matriz_html.html">Matriz.html</a>
|
144
|
+
|
145
|
+
<li class="file"><a href="./doc/Matriz_densa_html.html">Matriz_densa.html</a>
|
146
|
+
|
147
|
+
<li class="file"><a href="./doc/Matriz_dispersa_html.html">Matriz_dispersa.html</a>
|
148
|
+
|
149
|
+
<li class="file"><a href="./doc/Prct09_html.html">Prct09.html</a>
|
150
|
+
|
151
|
+
<li class="file"><a href="./doc/Rakefile_html.html">Rakefile.html</a>
|
152
|
+
|
153
|
+
<li class="file"><a href="./doc/Test_Matriz_html.html">Test_Matriz.html</a>
|
154
|
+
|
155
|
+
<li class="file"><a href="./doc/bin/prct09_html.html">prct09.html</a>
|
156
|
+
|
157
|
+
<li class="file"><a href="./doc/classes/Fraccion_html.html">Fraccion.html</a>
|
158
|
+
|
159
|
+
<li class="file"><a href="./doc/classes/Fraccion_src/M000024_html.html">M000024.html</a>
|
160
|
+
|
161
|
+
<li class="file"><a href="./doc/classes/Fraccion_src/M000025_html.html">M000025.html</a>
|
162
|
+
|
163
|
+
<li class="file"><a href="./doc/classes/Fraccion_src/M000026_html.html">M000026.html</a>
|
164
|
+
|
165
|
+
<li class="file"><a href="./doc/classes/Fraccion_src/M000027_html.html">M000027.html</a>
|
166
|
+
|
167
|
+
<li class="file"><a href="./doc/classes/Fraccion_src/M000028_html.html">M000028.html</a>
|
168
|
+
|
169
|
+
<li class="file"><a href="./doc/classes/Fraccion_src/M000029_html.html">M000029.html</a>
|
170
|
+
|
171
|
+
<li class="file"><a href="./doc/classes/Fraccion_src/M000030_html.html">M000030.html</a>
|
172
|
+
|
173
|
+
<li class="file"><a href="./doc/classes/Fraccion_src/M000031_html.html">M000031.html</a>
|
174
|
+
|
175
|
+
<li class="file"><a href="./doc/classes/Fraccion_src/M000032_html.html">M000032.html</a>
|
176
|
+
|
177
|
+
<li class="file"><a href="./doc/classes/Fraccion_src/M000033_html.html">M000033.html</a>
|
178
|
+
|
179
|
+
<li class="file"><a href="./doc/classes/Fraccion_src/M000034_html.html">M000034.html</a>
|
180
|
+
|
181
|
+
<li class="file"><a href="./doc/classes/Fraccion_src/M000035_html.html">M000035.html</a>
|
182
|
+
|
183
|
+
<li class="file"><a href="./doc/classes/Fraccion_src/M000036_html.html">M000036.html</a>
|
184
|
+
|
185
|
+
<li class="file"><a href="./doc/classes/Matriz_html.html">Matriz.html</a>
|
186
|
+
|
187
|
+
<li class="file"><a href="./doc/classes/Matriz_src/M000015_html.html">M000015.html</a>
|
188
|
+
|
189
|
+
<li class="file"><a href="./doc/classes/Matriz_src/M000016_html.html">M000016.html</a>
|
190
|
+
|
191
|
+
<li class="file"><a href="./doc/classes/Matriz_src/M000017_html.html">M000017.html</a>
|
192
|
+
|
193
|
+
<li class="file"><a href="./doc/classes/Matriz_src/M000018_html.html">M000018.html</a>
|
194
|
+
|
195
|
+
<li class="file"><a href="./doc/classes/Matriz_src/M000019_html.html">M000019.html</a>
|
196
|
+
|
197
|
+
<li class="file"><a href="./doc/classes/Matriz_src/M000020_html.html">M000020.html</a>
|
198
|
+
|
199
|
+
<li class="file"><a href="./doc/classes/Matriz_src/M000021_html.html">M000021.html</a>
|
200
|
+
|
201
|
+
<li class="file"><a href="./doc/classes/Matriz_src/M000022_html.html">M000022.html</a>
|
202
|
+
|
203
|
+
<li class="file"><a href="./doc/classes/Matriz_src/M000023_html.html">M000023.html</a>
|
204
|
+
|
205
|
+
<li class="file"><a href="./doc/classes/Matriz_densa_html.html">Matriz_densa.html</a>
|
206
|
+
|
207
|
+
<li class="file"><a href="./doc/classes/Matriz_densa_src/M000010_html.html">M000010.html</a>
|
208
|
+
|
209
|
+
<li class="file"><a href="./doc/classes/Matriz_densa_src/M000011_html.html">M000011.html</a>
|
210
|
+
|
211
|
+
<li class="file"><a href="./doc/classes/Matriz_densa_src/M000012_html.html">M000012.html</a>
|
212
|
+
|
213
|
+
<li class="file"><a href="./doc/classes/Matriz_densa_src/M000013_html.html">M000013.html</a>
|
214
|
+
|
215
|
+
<li class="file"><a href="./doc/classes/Matriz_densa_src/M000014_html.html">M000014.html</a>
|
216
|
+
|
217
|
+
<li class="file"><a href="./doc/classes/Matriz_dispersa_html.html">Matriz_dispersa.html</a>
|
218
|
+
|
219
|
+
<li class="file"><a href="./doc/classes/Matriz_dispersa_src/M000002_html.html">M000002.html</a>
|
220
|
+
|
221
|
+
<li class="file"><a href="./doc/classes/Matriz_dispersa_src/M000003_html.html">M000003.html</a>
|
222
|
+
|
223
|
+
<li class="file"><a href="./doc/classes/Matriz_dispersa_src/M000004_html.html">M000004.html</a>
|
224
|
+
|
225
|
+
<li class="file"><a href="./doc/classes/Matriz_dispersa_src/M000005_html.html">M000005.html</a>
|
226
|
+
|
227
|
+
<li class="file"><a href="./doc/classes/Matriz_dispersa_src/M000006_html.html">M000006.html</a>
|
228
|
+
|
229
|
+
<li class="file"><a href="./doc/classes/Matriz_dispersa_src/M000007_html.html">M000007.html</a>
|
230
|
+
|
231
|
+
<li class="file"><a href="./doc/classes/Matriz_dispersa_src/M000008_html.html">M000008.html</a>
|
232
|
+
|
233
|
+
<li class="file"><a href="./doc/classes/Matriz_dispersa_src/M000009_html.html">M000009.html</a>
|
234
|
+
|
235
|
+
<li class="file"><a href="./doc/classes/Prct09_html.html">Prct09.html</a>
|
236
|
+
|
237
|
+
<li class="file"><a href="./doc/classes/Test_Matriz_html.html">Test_Matriz.html</a>
|
238
|
+
|
239
|
+
<li class="file"><a href="./doc/classes/Test_Matriz_src/M000037_html.html">M000037.html</a>
|
240
|
+
|
241
|
+
<li class="file"><a href="./doc/classes/Test_Matriz_src/M000038_html.html">M000038.html</a>
|
242
|
+
|
243
|
+
<li class="file"><a href="./doc/classes/Test_Matriz_src/M000039_html.html">M000039.html</a>
|
244
|
+
|
245
|
+
<li class="file"><a href="./doc/classes/Test_Matriz_src/M000040_html.html">M000040.html</a>
|
246
|
+
|
247
|
+
<li class="file"><a href="./doc/created_rid.html">created.rid</a>
|
248
|
+
|
249
|
+
<li class="file"><a href="./doc/files/lib/Fraccion_rb_html.html">Fraccion_rb.html</a>
|
250
|
+
|
251
|
+
<li class="file"><a href="./doc/files/lib/Matriz_densa_rb_html.html">Matriz_densa_rb.html</a>
|
252
|
+
|
253
|
+
<li class="file"><a href="./doc/files/lib/Matriz_dispersa_rb_html.html">Matriz_dispersa_rb.html</a>
|
254
|
+
|
255
|
+
<li class="file"><a href="./doc/files/lib/Matriz_rb_html.html">Matriz_rb.html</a>
|
256
|
+
|
257
|
+
<li class="file"><a href="./doc/files/lib/mcd_rb_html.html">mcd_rb.html</a>
|
258
|
+
|
259
|
+
<li class="file"><a href="./doc/files/lib/mcd_rb_src/M000001_html.html">M000001.html</a>
|
260
|
+
|
261
|
+
<li class="file"><a href="./doc/files/lib/prct09/version_rb_html.html">version_rb.html</a>
|
262
|
+
|
263
|
+
<li class="file"><a href="./doc/files/lib/prct09_rb_html.html">prct09_rb.html</a>
|
264
|
+
|
265
|
+
<li class="file"><a href="./doc/files/spec/Matriz_spec_rb_html.html">Matriz_spec_rb.html</a>
|
266
|
+
|
267
|
+
<li class="file"><a href="./doc/files/test/tc_matriz_rb_html.html">tc_matriz_rb.html</a>
|
268
|
+
|
269
|
+
<li class="file"><a href="./doc/fr_class_index_html.html">fr_class_index.html</a>
|
270
|
+
|
271
|
+
<li class="file"><a href="./doc/fr_file_index_html.html">fr_file_index.html</a>
|
272
|
+
|
273
|
+
<li class="file"><a href="./doc/fr_method_index_html.html">fr_method_index.html</a>
|
274
|
+
|
275
|
+
<li class="file"><a href="./doc/index_html.html">index.html</a>
|
276
|
+
|
277
|
+
<li class="file"><a href="./doc/js/darkfish_js.html">darkfish.js</a>
|
278
|
+
|
279
|
+
<li class="file"><a href="./doc/js/jquery_js.html">jquery.js</a>
|
280
|
+
|
281
|
+
<li class="file"><a href="./doc/js/quicksearch_js.html">quicksearch.js</a>
|
282
|
+
|
283
|
+
<li class="file"><a href="./doc/js/thickbox-compressed_js.html">thickbox-compressed.js</a>
|
284
|
+
|
285
|
+
<li class="file"><a href="./doc/lib/Fraccion_rb_html.html">Fraccion_rb.html</a>
|
286
|
+
|
287
|
+
<li class="file"><a href="./doc/lib/Matriz_densa_rb_html.html">Matriz_densa_rb.html</a>
|
288
|
+
|
289
|
+
<li class="file"><a href="./doc/lib/Matriz_dispersa_rb_html.html">Matriz_dispersa_rb.html</a>
|
290
|
+
|
291
|
+
<li class="file"><a href="./doc/lib/Matriz_rb_html.html">Matriz_rb.html</a>
|
292
|
+
|
293
|
+
<li class="file"><a href="./doc/lib/prct09/version_rb_html.html">version_rb.html</a>
|
294
|
+
|
295
|
+
<li class="file"><a href="./doc/lib/prct09_rb_html.html">prct09_rb.html</a>
|
296
|
+
|
297
|
+
<li class="file"><a href="./doc/rdoc-style_css.html">rdoc-style.css</a>
|
298
|
+
|
299
|
+
<li class="file"><a href="./doc/rdoc_css.html">rdoc.css</a>
|
300
|
+
|
301
|
+
<li class="file"><a href="./doc/spec/Matriz_spec_rb_html.html">Matriz_spec_rb.html</a>
|
302
|
+
|
303
|
+
<li class="file"><a href="./doc/test/tc_matriz_rb_html.html">tc_matriz_rb.html</a>
|
304
|
+
|
305
|
+
<li class="file"><a href="./prct09_gemspec.html">prct09.gemspec</a>
|
306
|
+
|
307
|
+
</ul>
|
308
|
+
</nav>
|
309
|
+
|
310
|
+
<nav id="classindex-section" class="section project-section">
|
311
|
+
<h3 class="section-header">Class and Module Index</h3>
|
312
|
+
|
313
|
+
<ul class="link-list">
|
314
|
+
|
315
|
+
<li><a href="./Dsl.html">Dsl</a>
|
316
|
+
|
317
|
+
<li><a href="./Fraccion.html">Fraccion</a>
|
318
|
+
|
319
|
+
<li><a href="./Matriz.html">Matriz</a>
|
320
|
+
|
321
|
+
<li><a href="./Matriz_densa.html">Matriz_densa</a>
|
322
|
+
|
323
|
+
<li><a href="./Matriz_dispersa.html">Matriz_dispersa</a>
|
324
|
+
|
325
|
+
<li><a href="./Prct09.html">Prct09</a>
|
326
|
+
|
327
|
+
<li><a href="./Test_Matriz.html">Test_Matriz</a>
|
328
|
+
|
329
|
+
</ul>
|
330
|
+
</nav>
|
331
|
+
|
332
|
+
</div>
|
333
|
+
</nav>
|
334
|
+
|
335
|
+
<div id="documentation">
|
336
|
+
<h1 class="class">class Fraccion</h1>
|
337
|
+
|
338
|
+
<div id="description" class="description">
|
339
|
+
|
340
|
+
</div><!-- description -->
|
341
|
+
|
342
|
+
|
343
|
+
|
344
|
+
|
345
|
+
<section id="5Buntitled-5D" class="documentation-section">
|
346
|
+
|
347
|
+
|
348
|
+
|
349
|
+
|
350
|
+
|
351
|
+
|
352
|
+
|
353
|
+
<!-- Attributes -->
|
354
|
+
<section id="attribute-method-details" class="method-section section">
|
355
|
+
<h3 class="section-header">Attributes</h3>
|
356
|
+
|
357
|
+
|
358
|
+
<div id="attribute-i-d" class="method-detail">
|
359
|
+
<div class="method-heading attribute-method-heading">
|
360
|
+
<span class="method-name">d</span><span
|
361
|
+
class="attribute-access-type">[R]</span>
|
362
|
+
</div>
|
363
|
+
|
364
|
+
<div class="method-description">
|
365
|
+
|
366
|
+
|
367
|
+
|
368
|
+
</div>
|
369
|
+
</div>
|
370
|
+
|
371
|
+
<div id="attribute-i-n" class="method-detail">
|
372
|
+
<div class="method-heading attribute-method-heading">
|
373
|
+
<span class="method-name">n</span><span
|
374
|
+
class="attribute-access-type">[R]</span>
|
375
|
+
</div>
|
376
|
+
|
377
|
+
<div class="method-description">
|
378
|
+
|
379
|
+
|
380
|
+
|
381
|
+
</div>
|
382
|
+
</div>
|
383
|
+
|
384
|
+
</section><!-- attribute-method-details -->
|
385
|
+
|
386
|
+
|
387
|
+
<!-- Methods -->
|
388
|
+
|
389
|
+
<section id="public-class-5Buntitled-5D-method-details" class="method-section section">
|
390
|
+
<h3 class="section-header">Public Class Methods</h3>
|
391
|
+
|
392
|
+
|
393
|
+
<div id="method-c-new" class="method-detail ">
|
394
|
+
|
395
|
+
<div class="method-heading">
|
396
|
+
<span class="method-name">new</span><span
|
397
|
+
class="method-args">(n, d)</span>
|
398
|
+
|
399
|
+
<span class="method-click-advice">click to toggle source</span>
|
400
|
+
|
401
|
+
</div>
|
402
|
+
|
403
|
+
|
404
|
+
<div class="method-description">
|
405
|
+
|
406
|
+
<p>Constructor de la clase <a href="Fraccion.html">Fraccion</a></p>
|
407
|
+
|
408
|
+
|
409
|
+
|
410
|
+
|
411
|
+
<div class="method-source-code" id="new-source">
|
412
|
+
<pre><span class="ruby-comment"># File lib/Fraccion.rb, line 17</span>
|
413
|
+
<span class="ruby-keyword">def</span> <span class="ruby-identifier">initialize</span>(<span class="ruby-identifier">n</span>, <span class="ruby-identifier">d</span>)
|
414
|
+
<span class="ruby-ivar">@n</span> = <span class="ruby-identifier">n</span> <span class="ruby-operator">/</span> <span class="ruby-identifier">mcd</span>(<span class="ruby-identifier">n</span>,<span class="ruby-identifier">d</span>)
|
415
|
+
<span class="ruby-ivar">@d</span> = <span class="ruby-identifier">d</span> <span class="ruby-operator">/</span> <span class="ruby-identifier">mcd</span>(<span class="ruby-identifier">n</span>,<span class="ruby-identifier">d</span>)
|
416
|
+
<span class="ruby-keyword">end</span></pre>
|
417
|
+
</div><!-- new-source -->
|
418
|
+
|
419
|
+
</div>
|
420
|
+
|
421
|
+
|
422
|
+
|
423
|
+
|
424
|
+
</div><!-- new-method -->
|
425
|
+
|
426
|
+
|
427
|
+
</section><!-- public-class-method-details -->
|
428
|
+
|
429
|
+
<section id="public-instance-5Buntitled-5D-method-details" class="method-section section">
|
430
|
+
<h3 class="section-header">Public Instance Methods</h3>
|
431
|
+
|
432
|
+
|
433
|
+
<div id="method-i-25" class="method-detail ">
|
434
|
+
|
435
|
+
<div class="method-heading">
|
436
|
+
<span class="method-name">%</span><span
|
437
|
+
class="method-args">(other)</span>
|
438
|
+
|
439
|
+
<span class="method-click-advice">click to toggle source</span>
|
440
|
+
|
441
|
+
</div>
|
442
|
+
|
443
|
+
|
444
|
+
<div class="method-description">
|
445
|
+
|
446
|
+
<p>Sobrecarga del operador % para operar con fracciones</p>
|
447
|
+
|
448
|
+
|
449
|
+
|
450
|
+
|
451
|
+
<div class="method-source-code" id="25-source">
|
452
|
+
<pre><span class="ruby-comment"># File lib/Fraccion.rb, line 56</span>
|
453
|
+
<span class="ruby-keyword">def</span> <span class="ruby-operator">%</span> (<span class="ruby-identifier">other</span>)
|
454
|
+
<span class="ruby-constant">Fraccion</span>.<span class="ruby-identifier">new</span>((<span class="ruby-identifier">imprimirFlotante</span> <span class="ruby-operator">%</span> <span class="ruby-identifier">other</span>.<span class="ruby-identifier">imprimirFlotante</span><span class="ruby-operator">*</span><span class="ruby-value">1000</span>).<span class="ruby-identifier">to_i</span>, <span class="ruby-value">1000</span>)
|
455
|
+
<span class="ruby-keyword">end</span></pre>
|
456
|
+
</div><!-- 25-source -->
|
457
|
+
|
458
|
+
</div>
|
459
|
+
|
460
|
+
|
461
|
+
|
462
|
+
|
463
|
+
</div><!-- 25-method -->
|
464
|
+
|
465
|
+
|
466
|
+
<div id="method-i-2A" class="method-detail ">
|
467
|
+
|
468
|
+
<div class="method-heading">
|
469
|
+
<span class="method-name">*</span><span
|
470
|
+
class="method-args">(other)</span>
|
471
|
+
|
472
|
+
<span class="method-click-advice">click to toggle source</span>
|
473
|
+
|
474
|
+
</div>
|
475
|
+
|
476
|
+
|
477
|
+
<div class="method-description">
|
478
|
+
|
479
|
+
<p>Sobrecarga del operador * para operar con fracciones</p>
|
480
|
+
|
481
|
+
|
482
|
+
|
483
|
+
|
484
|
+
<div class="method-source-code" id="2A-source">
|
485
|
+
<pre><span class="ruby-comment"># File lib/Fraccion.rb, line 48</span>
|
486
|
+
<span class="ruby-keyword">def</span> <span class="ruby-operator">*</span> (<span class="ruby-identifier">other</span>)
|
487
|
+
<span class="ruby-constant">Fraccion</span>.<span class="ruby-identifier">new</span>(<span class="ruby-ivar">@n</span><span class="ruby-operator">*</span> <span class="ruby-identifier">other</span>.<span class="ruby-identifier">n</span>, <span class="ruby-ivar">@d</span> <span class="ruby-operator">*</span> <span class="ruby-identifier">other</span>.<span class="ruby-identifier">d</span>)
|
488
|
+
<span class="ruby-keyword">end</span></pre>
|
489
|
+
</div><!-- 2A-source -->
|
490
|
+
|
491
|
+
</div>
|
492
|
+
|
493
|
+
|
494
|
+
|
495
|
+
|
496
|
+
</div><!-- 2A-method -->
|
497
|
+
|
498
|
+
|
499
|
+
<div id="method-i-2B" class="method-detail ">
|
500
|
+
|
501
|
+
<div class="method-heading">
|
502
|
+
<span class="method-name">+</span><span
|
503
|
+
class="method-args">(other)</span>
|
504
|
+
|
505
|
+
<span class="method-click-advice">click to toggle source</span>
|
506
|
+
|
507
|
+
</div>
|
508
|
+
|
509
|
+
|
510
|
+
<div class="method-description">
|
511
|
+
|
512
|
+
<p>Sobrecarga del operador + para operar con fracciones</p>
|
513
|
+
|
514
|
+
|
515
|
+
|
516
|
+
|
517
|
+
<div class="method-source-code" id="2B-source">
|
518
|
+
<pre><span class="ruby-comment"># File lib/Fraccion.rb, line 40</span>
|
519
|
+
<span class="ruby-keyword">def</span> <span class="ruby-operator">+</span> (<span class="ruby-identifier">other</span>)
|
520
|
+
<span class="ruby-constant">Fraccion</span>.<span class="ruby-identifier">new</span>(<span class="ruby-ivar">@n</span><span class="ruby-operator">*</span> <span class="ruby-identifier">other</span>.<span class="ruby-identifier">d</span> <span class="ruby-operator">+</span> <span class="ruby-identifier">other</span>.<span class="ruby-identifier">n</span><span class="ruby-operator">*</span><span class="ruby-ivar">@d</span>, <span class="ruby-ivar">@d</span> <span class="ruby-operator">*</span> <span class="ruby-identifier">other</span>.<span class="ruby-identifier">d</span>)
|
521
|
+
<span class="ruby-keyword">end</span></pre>
|
522
|
+
</div><!-- 2B-source -->
|
523
|
+
|
524
|
+
</div>
|
525
|
+
|
526
|
+
|
527
|
+
|
528
|
+
|
529
|
+
</div><!-- 2B-method -->
|
530
|
+
|
531
|
+
|
532
|
+
<div id="method-i-2D" class="method-detail ">
|
533
|
+
|
534
|
+
<div class="method-heading">
|
535
|
+
<span class="method-name">-</span><span
|
536
|
+
class="method-args">(other)</span>
|
537
|
+
|
538
|
+
<span class="method-click-advice">click to toggle source</span>
|
539
|
+
|
540
|
+
</div>
|
541
|
+
|
542
|
+
|
543
|
+
<div class="method-description">
|
544
|
+
|
545
|
+
<p>Sobrecarga del operador - para operar con fracciones</p>
|
546
|
+
|
547
|
+
|
548
|
+
|
549
|
+
|
550
|
+
<div class="method-source-code" id="2D-source">
|
551
|
+
<pre><span class="ruby-comment"># File lib/Fraccion.rb, line 44</span>
|
552
|
+
<span class="ruby-keyword">def</span> <span class="ruby-operator">-</span> (<span class="ruby-identifier">other</span>)
|
553
|
+
<span class="ruby-constant">Fraccion</span>.<span class="ruby-identifier">new</span>(<span class="ruby-ivar">@n</span><span class="ruby-operator">*</span> <span class="ruby-identifier">other</span>.<span class="ruby-identifier">d</span> <span class="ruby-operator">-</span> <span class="ruby-identifier">other</span>.<span class="ruby-identifier">n</span><span class="ruby-operator">*</span><span class="ruby-ivar">@d</span>, <span class="ruby-ivar">@d</span> <span class="ruby-operator">*</span> <span class="ruby-identifier">other</span>.<span class="ruby-identifier">d</span>)
|
554
|
+
<span class="ruby-keyword">end</span></pre>
|
555
|
+
</div><!-- 2D-source -->
|
556
|
+
|
557
|
+
</div>
|
558
|
+
|
559
|
+
|
560
|
+
|
561
|
+
|
562
|
+
</div><!-- 2D-method -->
|
563
|
+
|
564
|
+
|
565
|
+
<div id="method-i-2D-40" class="method-detail ">
|
566
|
+
|
567
|
+
<div class="method-heading">
|
568
|
+
<span class="method-name">-@</span><span
|
569
|
+
class="method-args">()</span>
|
570
|
+
|
571
|
+
<span class="method-click-advice">click to toggle source</span>
|
572
|
+
|
573
|
+
</div>
|
574
|
+
|
575
|
+
|
576
|
+
<div class="method-description">
|
577
|
+
|
578
|
+
<p>Calcula el opuesto de una fraccion</p>
|
579
|
+
|
580
|
+
|
581
|
+
|
582
|
+
|
583
|
+
<div class="method-source-code" id="2D-40-source">
|
584
|
+
<pre><span class="ruby-comment"># File lib/Fraccion.rb, line 89</span>
|
585
|
+
<span class="ruby-keyword">def</span> <span class="ruby-operator">-@</span>
|
586
|
+
<span class="ruby-constant">Fraccion</span>.<span class="ruby-identifier">new</span>(<span class="ruby-ivar">@n</span><span class="ruby-operator">*</span><span class="ruby-value">-1</span>, <span class="ruby-ivar">@d</span>)
|
587
|
+
<span class="ruby-keyword">end</span></pre>
|
588
|
+
</div><!-- 2D-40-source -->
|
589
|
+
|
590
|
+
</div>
|
591
|
+
|
592
|
+
|
593
|
+
|
594
|
+
|
595
|
+
</div><!-- 2D-40-method -->
|
596
|
+
|
597
|
+
|
598
|
+
<div id="method-i-2F" class="method-detail ">
|
599
|
+
|
600
|
+
<div class="method-heading">
|
601
|
+
<span class="method-name">/</span><span
|
602
|
+
class="method-args">(other)</span>
|
603
|
+
|
604
|
+
<span class="method-click-advice">click to toggle source</span>
|
605
|
+
|
606
|
+
</div>
|
607
|
+
|
608
|
+
|
609
|
+
<div class="method-description">
|
610
|
+
|
611
|
+
<p>Sobrecarga del operador / para operar con fracciones</p>
|
612
|
+
|
613
|
+
|
614
|
+
|
615
|
+
|
616
|
+
<div class="method-source-code" id="2F-source">
|
617
|
+
<pre><span class="ruby-comment"># File lib/Fraccion.rb, line 52</span>
|
618
|
+
<span class="ruby-keyword">def</span> <span class="ruby-operator">/</span> (<span class="ruby-identifier">other</span>)
|
619
|
+
<span class="ruby-constant">Fraccion</span>.<span class="ruby-identifier">new</span>(<span class="ruby-ivar">@n</span><span class="ruby-operator">*</span> <span class="ruby-identifier">other</span>.<span class="ruby-identifier">d</span>, <span class="ruby-ivar">@d</span> <span class="ruby-operator">*</span> <span class="ruby-identifier">other</span>.<span class="ruby-identifier">n</span>)
|
620
|
+
<span class="ruby-keyword">end</span></pre>
|
621
|
+
</div><!-- 2F-source -->
|
622
|
+
|
623
|
+
</div>
|
624
|
+
|
625
|
+
|
626
|
+
|
627
|
+
|
628
|
+
</div><!-- 2F-method -->
|
629
|
+
|
630
|
+
|
631
|
+
<div id="method-i-3C-3D-3E" class="method-detail ">
|
632
|
+
|
633
|
+
<div class="method-heading">
|
634
|
+
<span class="method-name"><=></span><span
|
635
|
+
class="method-args">(other)</span>
|
636
|
+
|
637
|
+
<span class="method-click-advice">click to toggle source</span>
|
638
|
+
|
639
|
+
</div>
|
640
|
+
|
641
|
+
|
642
|
+
<div class="method-description">
|
643
|
+
|
644
|
+
<p>Sobrecarga del <=> para poder comparar fracciones (==, <=, >=,
|
645
|
+
…)</p>
|
646
|
+
|
647
|
+
|
648
|
+
|
649
|
+
|
650
|
+
<div class="method-source-code" id="3C-3D-3E-source">
|
651
|
+
<pre><span class="ruby-comment"># File lib/Fraccion.rb, line 60</span>
|
652
|
+
<span class="ruby-keyword">def</span> <span class="ruby-operator"><=></span> (<span class="ruby-identifier">other</span>)
|
653
|
+
<span class="ruby-identifier">imprimirFlotante</span> <span class="ruby-operator"><=></span> <span class="ruby-identifier">other</span>.<span class="ruby-identifier">imprimirFlotante</span>
|
654
|
+
<span class="ruby-keyword">end</span></pre>
|
655
|
+
</div><!-- 3C-3D-3E-source -->
|
656
|
+
|
657
|
+
</div>
|
658
|
+
|
659
|
+
|
660
|
+
|
661
|
+
|
662
|
+
</div><!-- 3C-3D-3E-method -->
|
663
|
+
|
664
|
+
|
665
|
+
<div id="method-i-abs" class="method-detail ">
|
666
|
+
|
667
|
+
<div class="method-heading">
|
668
|
+
<span class="method-name">abs</span><span
|
669
|
+
class="method-args">()</span>
|
670
|
+
|
671
|
+
<span class="method-click-advice">click to toggle source</span>
|
672
|
+
|
673
|
+
</div>
|
674
|
+
|
675
|
+
|
676
|
+
<div class="method-description">
|
677
|
+
|
678
|
+
<p>Calcula el valor absoluto</p>
|
679
|
+
|
680
|
+
|
681
|
+
|
682
|
+
|
683
|
+
<div class="method-source-code" id="abs-source">
|
684
|
+
<pre><span class="ruby-comment"># File lib/Fraccion.rb, line 65</span>
|
685
|
+
<span class="ruby-keyword">def</span> <span class="ruby-identifier">abs</span>
|
686
|
+
<span class="ruby-keyword">if</span> (<span class="ruby-ivar">@n</span> <span class="ruby-operator"><</span> <span class="ruby-value">0</span>) <span class="ruby-operator">^</span> (<span class="ruby-ivar">@d</span> <span class="ruby-operator"><</span> <span class="ruby-value">0</span>)
|
687
|
+
<span class="ruby-keyword">if</span> <span class="ruby-ivar">@n</span> <span class="ruby-operator"><</span> <span class="ruby-value">0</span>
|
688
|
+
<span class="ruby-constant">Fraccion</span>.<span class="ruby-identifier">new</span>(<span class="ruby-ivar">@n</span><span class="ruby-operator">*</span><span class="ruby-value">-1</span>, <span class="ruby-ivar">@d</span>)
|
689
|
+
<span class="ruby-keyword">else</span>
|
690
|
+
<span class="ruby-constant">Fraccion</span>.<span class="ruby-identifier">new</span>(<span class="ruby-ivar">@n</span>, <span class="ruby-ivar">@d</span><span class="ruby-operator">*</span><span class="ruby-value">-1</span>)
|
691
|
+
<span class="ruby-keyword">end</span>
|
692
|
+
|
693
|
+
<span class="ruby-keyword">elsif</span> (<span class="ruby-ivar">@n</span> <span class="ruby-operator"><</span> <span class="ruby-value">0</span>) <span class="ruby-operator">&&</span> (<span class="ruby-ivar">@d</span> <span class="ruby-operator"><</span> <span class="ruby-value">0</span>)
|
694
|
+
<span class="ruby-constant">Fraccion</span>.<span class="ruby-identifier">new</span>(<span class="ruby-ivar">@n</span><span class="ruby-operator">*</span><span class="ruby-value">-1</span>, <span class="ruby-ivar">@d</span><span class="ruby-operator">*</span><span class="ruby-value">-1</span>)
|
695
|
+
|
696
|
+
<span class="ruby-keyword">else</span>
|
697
|
+
<span class="ruby-constant">Fraccion</span>.<span class="ruby-identifier">new</span>(<span class="ruby-ivar">@n</span>, <span class="ruby-ivar">@d</span>)
|
698
|
+
<span class="ruby-keyword">end</span>
|
699
|
+
<span class="ruby-keyword">end</span></pre>
|
700
|
+
</div><!-- abs-source -->
|
701
|
+
|
702
|
+
</div>
|
703
|
+
|
704
|
+
|
705
|
+
|
706
|
+
|
707
|
+
</div><!-- abs-method -->
|
708
|
+
|
709
|
+
|
710
|
+
<div id="method-i-coerce" class="method-detail ">
|
711
|
+
|
712
|
+
<div class="method-heading">
|
713
|
+
<span class="method-name">coerce</span><span
|
714
|
+
class="method-args">(other)</span>
|
715
|
+
|
716
|
+
<span class="method-click-advice">click to toggle source</span>
|
717
|
+
|
718
|
+
</div>
|
719
|
+
|
720
|
+
|
721
|
+
<div class="method-description">
|
722
|
+
|
723
|
+
|
724
|
+
|
725
|
+
|
726
|
+
|
727
|
+
|
728
|
+
<div class="method-source-code" id="coerce-source">
|
729
|
+
<pre><span class="ruby-comment"># File lib/Fraccion.rb, line 32</span>
|
730
|
+
<span class="ruby-keyword">def</span> <span class="ruby-identifier">coerce</span>(<span class="ruby-identifier">other</span>)
|
731
|
+
<span class="ruby-keyword">if</span> (<span class="ruby-identifier">other</span>.<span class="ruby-identifier">is_a?</span>(<span class="ruby-constant">Numeric</span>))
|
732
|
+
[<span class="ruby-constant">Fraccion</span>.<span class="ruby-identifier">new</span>(<span class="ruby-identifier">other</span>.<span class="ruby-identifier">to_i</span>,<span class="ruby-value">1</span>),<span class="ruby-keyword">self</span>]
|
733
|
+
<span class="ruby-keyword">end</span>
|
734
|
+
<span class="ruby-keyword">end</span></pre>
|
735
|
+
</div><!-- coerce-source -->
|
736
|
+
|
737
|
+
</div>
|
738
|
+
|
739
|
+
|
740
|
+
|
741
|
+
|
742
|
+
</div><!-- coerce-method -->
|
743
|
+
|
744
|
+
|
745
|
+
<div id="method-i-imprimirFlotante" class="method-detail ">
|
746
|
+
|
747
|
+
<div class="method-heading">
|
748
|
+
<span class="method-name">imprimirFlotante</span><span
|
749
|
+
class="method-args">()</span>
|
750
|
+
|
751
|
+
<span class="method-click-advice">click to toggle source</span>
|
752
|
+
|
753
|
+
</div>
|
754
|
+
|
755
|
+
|
756
|
+
<div class="method-description">
|
757
|
+
|
758
|
+
<p>Pasa a flotante el objeto <a href="Fraccion.html">Fraccion</a></p>
|
759
|
+
|
760
|
+
|
761
|
+
|
762
|
+
|
763
|
+
<div class="method-source-code" id="imprimirFlotante-source">
|
764
|
+
<pre><span class="ruby-comment"># File lib/Fraccion.rb, line 28</span>
|
765
|
+
<span class="ruby-keyword">def</span> <span class="ruby-identifier">imprimirFlotante</span>
|
766
|
+
<span class="ruby-ivar">@n</span>.<span class="ruby-identifier">to_f</span><span class="ruby-operator">/</span><span class="ruby-ivar">@d</span>.<span class="ruby-identifier">to_f</span>
|
767
|
+
<span class="ruby-keyword">end</span></pre>
|
768
|
+
</div><!-- imprimirFlotante-source -->
|
769
|
+
|
770
|
+
</div>
|
771
|
+
|
772
|
+
|
773
|
+
|
774
|
+
|
775
|
+
</div><!-- imprimirFlotante-method -->
|
776
|
+
|
777
|
+
|
778
|
+
<div id="method-i-imprimirFraccion" class="method-detail ">
|
779
|
+
|
780
|
+
<div class="method-heading">
|
781
|
+
<span class="method-name">imprimirFraccion</span><span
|
782
|
+
class="method-args">()</span>
|
783
|
+
|
784
|
+
<span class="method-click-advice">click to toggle source</span>
|
785
|
+
|
786
|
+
</div>
|
787
|
+
|
788
|
+
|
789
|
+
<div class="method-description">
|
790
|
+
|
791
|
+
<p>Pasa a string el objeto <a href="Fraccion.html">Fraccion</a></p>
|
792
|
+
|
793
|
+
|
794
|
+
|
795
|
+
|
796
|
+
<div class="method-source-code" id="imprimirFraccion-source">
|
797
|
+
<pre><span class="ruby-comment"># File lib/Fraccion.rb, line 23</span>
|
798
|
+
<span class="ruby-keyword">def</span> <span class="ruby-identifier">imprimirFraccion</span>
|
799
|
+
<span class="ruby-node">"#{@n}/#{@d}"</span>
|
800
|
+
<span class="ruby-keyword">end</span></pre>
|
801
|
+
</div><!-- imprimirFraccion-source -->
|
802
|
+
|
803
|
+
</div>
|
804
|
+
|
805
|
+
|
806
|
+
|
807
|
+
|
808
|
+
</div><!-- imprimirFraccion-method -->
|
809
|
+
|
810
|
+
|
811
|
+
<div id="method-i-reciprocal" class="method-detail ">
|
812
|
+
|
813
|
+
<div class="method-heading">
|
814
|
+
<span class="method-name">reciprocal</span><span
|
815
|
+
class="method-args">()</span>
|
816
|
+
|
817
|
+
<span class="method-click-advice">click to toggle source</span>
|
818
|
+
|
819
|
+
</div>
|
820
|
+
|
821
|
+
|
822
|
+
<div class="method-description">
|
823
|
+
|
824
|
+
<p>Calcula el inverso de una fraccion</p>
|
825
|
+
|
826
|
+
|
827
|
+
|
828
|
+
|
829
|
+
<div class="method-source-code" id="reciprocal-source">
|
830
|
+
<pre><span class="ruby-comment"># File lib/Fraccion.rb, line 83</span>
|
831
|
+
<span class="ruby-keyword">def</span> <span class="ruby-identifier">reciprocal</span>
|
832
|
+
<span class="ruby-constant">Fraccion</span>.<span class="ruby-identifier">new</span>(<span class="ruby-ivar">@d</span>, <span class="ruby-ivar">@n</span>)
|
833
|
+
<span class="ruby-keyword">end</span></pre>
|
834
|
+
</div><!-- reciprocal-source -->
|
835
|
+
|
836
|
+
</div>
|
837
|
+
|
838
|
+
|
839
|
+
|
840
|
+
|
841
|
+
</div><!-- reciprocal-method -->
|
842
|
+
|
843
|
+
|
844
|
+
</section><!-- public-instance-method-details -->
|
845
|
+
|
846
|
+
</section><!-- 5Buntitled-5D -->
|
847
|
+
|
848
|
+
</div><!-- documentation -->
|
849
|
+
|
850
|
+
|
851
|
+
<footer id="validator-badges">
|
852
|
+
<p><a href="http://validator.w3.org/check/referer">[Validate]</a>
|
853
|
+
<p>Generated by <a href="https://github.com/rdoc/rdoc">RDoc</a> 4.0.0.
|
854
|
+
<p>Generated with the <a href="http://deveiate.org/projects/Darkfish-Rdoc/">Darkfish Rdoc Generator</a> 3.
|
855
|
+
</footer>
|
856
|
+
|