linmeric 0.1.0 → 0.2.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 +4 -4
- data/Gemfile +6 -0
- data/LICENSE.txt +21 -0
- data/README.md +51 -0
- data/Rakefile +10 -0
- data/bin/help/Help.rb +184 -0
- data/bin/help/Help_inst.rb +244 -0
- data/bin/linguide +23 -0
- data/bin/linmeric +36 -70
- data/doc/Archive.html +352 -0
- data/doc/Calculator/Evaluator.html +477 -0
- data/doc/Calculator/Lexer.html +186 -0
- data/doc/Calculator/Token.html +257 -0
- data/doc/Calculator.html +181 -0
- data/doc/Dim.html +257 -0
- data/doc/Filename.html +246 -0
- data/doc/Fixnum.html +253 -0
- data/doc/Float.html +253 -0
- data/doc/Function.html +784 -0
- data/doc/InputError.html +102 -0
- data/doc/Instructions_en.txt +6 -7
- data/doc/Instructions_it.txt +6 -9
- data/doc/Integrators.html +436 -0
- data/doc/LU.html +435 -0
- data/doc/Lexer.html +261 -0
- data/doc/Linmeric.html +109 -0
- data/doc/Listener.html +605 -0
- data/doc/Matrix.html +1719 -0
- data/doc/MyArgError.html +102 -0
- data/doc/NilClass.html +202 -0
- data/doc/Numeric.html +251 -0
- data/doc/Parser.html +389 -0
- data/doc/PrintError.html +622 -0
- data/doc/README_md.html +142 -0
- data/doc/Scp.html +530 -0
- data/doc/Sizer.html +652 -0
- data/doc/String.html +540 -0
- data/doc/Token.html +341 -0
- data/doc/Tool.html +394 -0
- data/doc/created.rid +18 -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 +190 -0
- data/doc/js/darkfish.js +161 -0
- data/doc/js/jquery.js +9404 -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/table_of_contents.html +834 -0
- data/lib/linmeric/Archive.rb +22 -1
- data/lib/linmeric/Calculator.rb +252 -0
- data/lib/linmeric/CnGal_Matrix_class.rb +130 -49
- data/lib/linmeric/CnGal_new_classes.rb +139 -37
- data/lib/linmeric/CnGal_tools.rb +23 -40
- data/lib/linmeric/Error_print.rb +35 -1
- data/lib/linmeric/Function_class.rb +70 -11
- data/lib/linmeric/Integrators.rb +81 -35
- data/lib/linmeric/LU.rb +26 -5
- data/lib/linmeric/Lexer.rb +19 -1
- data/lib/linmeric/Listener.rb +25 -5
- data/lib/linmeric/Parser.rb +23 -1
- data/lib/linmeric/Scopify.rb +52 -31
- data/lib/linmeric/Sizer.rb +43 -10
- data/lib/linmeric/Token.rb +23 -4
- data/lib/linmeric/version.rb +3 -0
- data/lib/linmeric.rb +10 -8
- data/lib/linmeric_bin.rb +12 -0
- metadata +126 -22
- data/doc/Instructions_en.html +0 -231
- data/doc/Instructions_it.html +0 -231
- data/doc/README_en.html +0 -177
- data/doc/README_en.txt +0 -30
- data/doc/README_it.html +0 -187
- data/doc/README_it.txt +0 -32
data/doc/Dim.html
ADDED
|
@@ -0,0 +1,257 @@
|
|
|
1
|
+
<!DOCTYPE html>
|
|
2
|
+
|
|
3
|
+
<html>
|
|
4
|
+
<head>
|
|
5
|
+
<meta charset="UTF-8">
|
|
6
|
+
|
|
7
|
+
<title>class Dim - 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" role="document" class="class">
|
|
22
|
+
<nav role="navigation">
|
|
23
|
+
<div id="project-navigation">
|
|
24
|
+
<div id="home-section" role="region" title="Quick navigation" class="nav-section">
|
|
25
|
+
<h2>
|
|
26
|
+
<a href="./index.html" rel="home">Home</a>
|
|
27
|
+
</h2>
|
|
28
|
+
|
|
29
|
+
<div id="table-of-contents-navigation">
|
|
30
|
+
<a href="./table_of_contents.html#pages">Pages</a>
|
|
31
|
+
<a href="./table_of_contents.html#classes">Classes</a>
|
|
32
|
+
<a href="./table_of_contents.html#methods">Methods</a>
|
|
33
|
+
</div>
|
|
34
|
+
</div>
|
|
35
|
+
|
|
36
|
+
<div id="search-section" role="search" class="project-section initially-hidden">
|
|
37
|
+
<form action="#" method="get" accept-charset="utf-8">
|
|
38
|
+
<div id="search-field-wrapper">
|
|
39
|
+
<input id="search-field" role="combobox" aria-label="Search"
|
|
40
|
+
aria-autocomplete="list" aria-controls="search-results"
|
|
41
|
+
type="text" name="search" placeholder="Search" spellcheck="false"
|
|
42
|
+
title="Type to search, Up and Down to navigate, Enter to load">
|
|
43
|
+
</div>
|
|
44
|
+
|
|
45
|
+
<ul id="search-results" aria-label="Search Results"
|
|
46
|
+
aria-busy="false" aria-expanded="false"
|
|
47
|
+
aria-atomic="false" class="initially-hidden"></ul>
|
|
48
|
+
</form>
|
|
49
|
+
</div>
|
|
50
|
+
|
|
51
|
+
</div>
|
|
52
|
+
|
|
53
|
+
|
|
54
|
+
|
|
55
|
+
<div id="class-metadata">
|
|
56
|
+
|
|
57
|
+
<div id="parent-class-section" class="nav-section">
|
|
58
|
+
<h3>Parent</h3>
|
|
59
|
+
|
|
60
|
+
|
|
61
|
+
<p class="link">Object
|
|
62
|
+
|
|
63
|
+
</div>
|
|
64
|
+
|
|
65
|
+
|
|
66
|
+
|
|
67
|
+
<!-- Method Quickref -->
|
|
68
|
+
<div id="method-list-section" class="nav-section">
|
|
69
|
+
<h3>Methods</h3>
|
|
70
|
+
|
|
71
|
+
<ul class="link-list" role="directory">
|
|
72
|
+
|
|
73
|
+
<li ><a href="#method-c-new">::new</a>
|
|
74
|
+
|
|
75
|
+
<li ><a href="#method-i-dx">#dx</a>
|
|
76
|
+
|
|
77
|
+
<li ><a href="#method-i-sx">#sx</a>
|
|
78
|
+
|
|
79
|
+
</ul>
|
|
80
|
+
</div>
|
|
81
|
+
|
|
82
|
+
</div>
|
|
83
|
+
</nav>
|
|
84
|
+
|
|
85
|
+
<main role="main" aria-labelledby="class-Dim">
|
|
86
|
+
<h1 id="class-Dim" class="class">
|
|
87
|
+
class Dim
|
|
88
|
+
</h1>
|
|
89
|
+
|
|
90
|
+
<section class="description">
|
|
91
|
+
|
|
92
|
+
<p>Definition of a dimension (structure: from-to)</p>
|
|
93
|
+
<dl class="rdoc-list note-list"><dt>Author
|
|
94
|
+
<dd>
|
|
95
|
+
<p>Massimiliano Dal Mas (<a
|
|
96
|
+
href="mailto:max.codeware@gmail.com">max.codeware@gmail.com</a>)</p>
|
|
97
|
+
</dd><dt>License
|
|
98
|
+
<dd>
|
|
99
|
+
<p>Distributed under MIT license</p>
|
|
100
|
+
</dd></dl>
|
|
101
|
+
|
|
102
|
+
</section>
|
|
103
|
+
|
|
104
|
+
|
|
105
|
+
|
|
106
|
+
|
|
107
|
+
<section id="5Buntitled-5D" class="documentation-section">
|
|
108
|
+
|
|
109
|
+
|
|
110
|
+
|
|
111
|
+
|
|
112
|
+
|
|
113
|
+
|
|
114
|
+
|
|
115
|
+
|
|
116
|
+
|
|
117
|
+
<section id="public-class-5Buntitled-5D-method-details" class="method-section">
|
|
118
|
+
<header>
|
|
119
|
+
<h3>Public Class Methods</h3>
|
|
120
|
+
</header>
|
|
121
|
+
|
|
122
|
+
|
|
123
|
+
<div id="method-c-new" class="method-detail ">
|
|
124
|
+
|
|
125
|
+
<div class="method-heading">
|
|
126
|
+
<span class="method-name">new</span><span
|
|
127
|
+
class="method-args">(str)</span>
|
|
128
|
+
|
|
129
|
+
<span class="method-click-advice">click to toggle source</span>
|
|
130
|
+
|
|
131
|
+
</div>
|
|
132
|
+
|
|
133
|
+
|
|
134
|
+
<div class="method-description">
|
|
135
|
+
|
|
136
|
+
<ul><li>
|
|
137
|
+
<p>*<strong>argument</strong>*: string to be converted to a dimension</p>
|
|
138
|
+
</li></ul>
|
|
139
|
+
|
|
140
|
+
|
|
141
|
+
|
|
142
|
+
|
|
143
|
+
<div class="method-source-code" id="new-source">
|
|
144
|
+
<pre><span class="ruby-comment"># File lib/linmeric/CnGal_new_classes.rb, line 299</span>
|
|
145
|
+
<span class="ruby-keyword">def</span> <span class="ruby-identifier">initialize</span>(<span class="ruby-identifier">str</span>)
|
|
146
|
+
<span class="ruby-identifier">str</span> = <span class="ruby-identifier">str</span> <span class="ruby-operator">-</span> <span class="ruby-string">'"'</span>
|
|
147
|
+
<span class="ruby-identifier">str</span> = <span class="ruby-identifier">str</span>.<span class="ruby-identifier">split</span>(<span class="ruby-string">','</span>)
|
|
148
|
+
<span class="ruby-keyword">if</span> <span class="ruby-identifier">str</span>.<span class="ruby-identifier">size</span> <span class="ruby-operator">==</span> <span class="ruby-value">2</span> <span class="ruby-keyword">and</span> <span class="ruby-identifier">str</span>[<span class="ruby-value">0</span>] <span class="ruby-operator">!=</span> <span class="ruby-string">""</span> <span class="ruby-keyword">and</span> <span class="ruby-identifier">str</span>[<span class="ruby-value">1</span>] <span class="ruby-operator">!=</span> <span class="ruby-string">""</span> <span class="ruby-keyword">then</span>
|
|
149
|
+
<span class="ruby-identifier">str</span>.<span class="ruby-identifier">each</span> <span class="ruby-keyword">do</span> <span class="ruby-operator">|</span><span class="ruby-identifier">val</span><span class="ruby-operator">|</span>
|
|
150
|
+
<span class="ruby-identifier">puts</span> <span class="ruby-string">' Argument Error: wrong range format'</span> <span class="ruby-keyword">unless</span> <span class="ruby-identifier">val</span>.<span class="ruby-identifier">number?</span>
|
|
151
|
+
<span class="ruby-keyword">end</span>
|
|
152
|
+
<span class="ruby-ivar">@sx</span> = <span class="ruby-identifier">str</span>[<span class="ruby-value">0</span>].<span class="ruby-identifier">to_n</span>
|
|
153
|
+
<span class="ruby-ivar">@dx</span> = <span class="ruby-identifier">str</span>[<span class="ruby-value">1</span>].<span class="ruby-identifier">to_n</span>
|
|
154
|
+
<span class="ruby-keyword">else</span>
|
|
155
|
+
<span class="ruby-identifier">puts</span> <span class="ruby-string">' Argument Error: wrong range format'</span>
|
|
156
|
+
<span class="ruby-keyword">end</span>
|
|
157
|
+
<span class="ruby-keyword">end</span></pre>
|
|
158
|
+
</div>
|
|
159
|
+
|
|
160
|
+
</div>
|
|
161
|
+
|
|
162
|
+
|
|
163
|
+
|
|
164
|
+
|
|
165
|
+
</div>
|
|
166
|
+
|
|
167
|
+
|
|
168
|
+
</section>
|
|
169
|
+
|
|
170
|
+
<section id="public-instance-5Buntitled-5D-method-details" class="method-section">
|
|
171
|
+
<header>
|
|
172
|
+
<h3>Public Instance Methods</h3>
|
|
173
|
+
</header>
|
|
174
|
+
|
|
175
|
+
|
|
176
|
+
<div id="method-i-dx" class="method-detail ">
|
|
177
|
+
|
|
178
|
+
<div class="method-heading">
|
|
179
|
+
<span class="method-name">dx</span><span
|
|
180
|
+
class="method-args">()</span>
|
|
181
|
+
|
|
182
|
+
<span class="method-click-advice">click to toggle source</span>
|
|
183
|
+
|
|
184
|
+
</div>
|
|
185
|
+
|
|
186
|
+
|
|
187
|
+
<div class="method-description">
|
|
188
|
+
|
|
189
|
+
<ul><li>
|
|
190
|
+
<p>*<strong>returns</strong>*: right dimension value</p>
|
|
191
|
+
</li></ul>
|
|
192
|
+
|
|
193
|
+
|
|
194
|
+
|
|
195
|
+
|
|
196
|
+
<div class="method-source-code" id="dx-source">
|
|
197
|
+
<pre><span class="ruby-comment"># File lib/linmeric/CnGal_new_classes.rb, line 319</span>
|
|
198
|
+
<span class="ruby-keyword">def</span> <span class="ruby-identifier">dx</span>()
|
|
199
|
+
<span class="ruby-keyword">return</span> <span class="ruby-ivar">@dx</span>
|
|
200
|
+
<span class="ruby-keyword">end</span></pre>
|
|
201
|
+
</div>
|
|
202
|
+
|
|
203
|
+
</div>
|
|
204
|
+
|
|
205
|
+
|
|
206
|
+
|
|
207
|
+
|
|
208
|
+
</div>
|
|
209
|
+
|
|
210
|
+
|
|
211
|
+
<div id="method-i-sx" class="method-detail ">
|
|
212
|
+
|
|
213
|
+
<div class="method-heading">
|
|
214
|
+
<span class="method-name">sx</span><span
|
|
215
|
+
class="method-args">()</span>
|
|
216
|
+
|
|
217
|
+
<span class="method-click-advice">click to toggle source</span>
|
|
218
|
+
|
|
219
|
+
</div>
|
|
220
|
+
|
|
221
|
+
|
|
222
|
+
<div class="method-description">
|
|
223
|
+
|
|
224
|
+
<ul><li>
|
|
225
|
+
<p>*<strong>returns</strong>*: left dimension value</p>
|
|
226
|
+
</li></ul>
|
|
227
|
+
|
|
228
|
+
|
|
229
|
+
|
|
230
|
+
|
|
231
|
+
<div class="method-source-code" id="sx-source">
|
|
232
|
+
<pre><span class="ruby-comment"># File lib/linmeric/CnGal_new_classes.rb, line 314</span>
|
|
233
|
+
<span class="ruby-keyword">def</span> <span class="ruby-identifier">sx</span>()
|
|
234
|
+
<span class="ruby-keyword">return</span> <span class="ruby-ivar">@sx</span>
|
|
235
|
+
<span class="ruby-keyword">end</span></pre>
|
|
236
|
+
</div>
|
|
237
|
+
|
|
238
|
+
</div>
|
|
239
|
+
|
|
240
|
+
|
|
241
|
+
|
|
242
|
+
|
|
243
|
+
</div>
|
|
244
|
+
|
|
245
|
+
|
|
246
|
+
</section>
|
|
247
|
+
|
|
248
|
+
</section>
|
|
249
|
+
</main>
|
|
250
|
+
|
|
251
|
+
|
|
252
|
+
<footer id="validator-badges" role="contentinfo">
|
|
253
|
+
<p><a href="http://validator.w3.org/check/referer">Validate</a>
|
|
254
|
+
<p>Generated by <a href="http://docs.seattlerb.org/rdoc/">RDoc</a> 4.2.0.
|
|
255
|
+
<p>Based on <a href="http://deveiate.org/projects/Darkfish-RDoc/">Darkfish</a> by <a href="http://deveiate.org">Michael Granger</a>.
|
|
256
|
+
</footer>
|
|
257
|
+
|
data/doc/Filename.html
ADDED
|
@@ -0,0 +1,246 @@
|
|
|
1
|
+
<!DOCTYPE html>
|
|
2
|
+
|
|
3
|
+
<html>
|
|
4
|
+
<head>
|
|
5
|
+
<meta charset="UTF-8">
|
|
6
|
+
|
|
7
|
+
<title>class Filename - 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" role="document" class="class">
|
|
22
|
+
<nav role="navigation">
|
|
23
|
+
<div id="project-navigation">
|
|
24
|
+
<div id="home-section" role="region" title="Quick navigation" class="nav-section">
|
|
25
|
+
<h2>
|
|
26
|
+
<a href="./index.html" rel="home">Home</a>
|
|
27
|
+
</h2>
|
|
28
|
+
|
|
29
|
+
<div id="table-of-contents-navigation">
|
|
30
|
+
<a href="./table_of_contents.html#pages">Pages</a>
|
|
31
|
+
<a href="./table_of_contents.html#classes">Classes</a>
|
|
32
|
+
<a href="./table_of_contents.html#methods">Methods</a>
|
|
33
|
+
</div>
|
|
34
|
+
</div>
|
|
35
|
+
|
|
36
|
+
<div id="search-section" role="search" class="project-section initially-hidden">
|
|
37
|
+
<form action="#" method="get" accept-charset="utf-8">
|
|
38
|
+
<div id="search-field-wrapper">
|
|
39
|
+
<input id="search-field" role="combobox" aria-label="Search"
|
|
40
|
+
aria-autocomplete="list" aria-controls="search-results"
|
|
41
|
+
type="text" name="search" placeholder="Search" spellcheck="false"
|
|
42
|
+
title="Type to search, Up and Down to navigate, Enter to load">
|
|
43
|
+
</div>
|
|
44
|
+
|
|
45
|
+
<ul id="search-results" aria-label="Search Results"
|
|
46
|
+
aria-busy="false" aria-expanded="false"
|
|
47
|
+
aria-atomic="false" class="initially-hidden"></ul>
|
|
48
|
+
</form>
|
|
49
|
+
</div>
|
|
50
|
+
|
|
51
|
+
</div>
|
|
52
|
+
|
|
53
|
+
|
|
54
|
+
|
|
55
|
+
<div id="class-metadata">
|
|
56
|
+
|
|
57
|
+
<div id="parent-class-section" class="nav-section">
|
|
58
|
+
<h3>Parent</h3>
|
|
59
|
+
|
|
60
|
+
|
|
61
|
+
<p class="link"><a href="String.html">String</a>
|
|
62
|
+
|
|
63
|
+
</div>
|
|
64
|
+
|
|
65
|
+
|
|
66
|
+
|
|
67
|
+
<!-- Method Quickref -->
|
|
68
|
+
<div id="method-list-section" class="nav-section">
|
|
69
|
+
<h3>Methods</h3>
|
|
70
|
+
|
|
71
|
+
<ul class="link-list" role="directory">
|
|
72
|
+
|
|
73
|
+
<li ><a href="#method-i-is_a-3F">#is_a?</a>
|
|
74
|
+
|
|
75
|
+
<li ><a href="#method-i-name">#name</a>
|
|
76
|
+
|
|
77
|
+
<li ><a href="#method-i-to_s">#to_s</a>
|
|
78
|
+
|
|
79
|
+
</ul>
|
|
80
|
+
</div>
|
|
81
|
+
|
|
82
|
+
</div>
|
|
83
|
+
</nav>
|
|
84
|
+
|
|
85
|
+
<main role="main" aria-labelledby="class-Filename">
|
|
86
|
+
<h1 id="class-Filename" class="class">
|
|
87
|
+
class Filename
|
|
88
|
+
</h1>
|
|
89
|
+
|
|
90
|
+
<section class="description">
|
|
91
|
+
|
|
92
|
+
<p>Defining a subclass of string to identify a fileneme</p>
|
|
93
|
+
<dl class="rdoc-list note-list"><dt>Author
|
|
94
|
+
<dd>
|
|
95
|
+
<p>Massimiliano Dal Mas (<a
|
|
96
|
+
href="mailto:max.codeware@gmail.com">max.codeware@gmail.com</a>)</p>
|
|
97
|
+
</dd><dt>License
|
|
98
|
+
<dd>
|
|
99
|
+
<p>Distributed under MIT license</p>
|
|
100
|
+
</dd></dl>
|
|
101
|
+
|
|
102
|
+
</section>
|
|
103
|
+
|
|
104
|
+
|
|
105
|
+
|
|
106
|
+
|
|
107
|
+
<section id="5Buntitled-5D" class="documentation-section">
|
|
108
|
+
|
|
109
|
+
|
|
110
|
+
|
|
111
|
+
|
|
112
|
+
|
|
113
|
+
|
|
114
|
+
|
|
115
|
+
|
|
116
|
+
|
|
117
|
+
<section id="public-instance-5Buntitled-5D-method-details" class="method-section">
|
|
118
|
+
<header>
|
|
119
|
+
<h3>Public Instance Methods</h3>
|
|
120
|
+
</header>
|
|
121
|
+
|
|
122
|
+
|
|
123
|
+
<div id="method-i-is_a-3F" class="method-detail ">
|
|
124
|
+
|
|
125
|
+
<div class="method-heading">
|
|
126
|
+
<span class="method-name">is_a?</span><span
|
|
127
|
+
class="method-args">(obj)</span>
|
|
128
|
+
|
|
129
|
+
<span class="method-click-advice">click to toggle source</span>
|
|
130
|
+
|
|
131
|
+
</div>
|
|
132
|
+
|
|
133
|
+
|
|
134
|
+
<div class="method-description">
|
|
135
|
+
|
|
136
|
+
<ul><li>
|
|
137
|
+
<p>*<strong>argument</strong>*: class name</p>
|
|
138
|
+
</li><li>
|
|
139
|
+
<p>*<strong>returns</strong>*: <code>true</code> if `self.class` = `obj`;
|
|
140
|
+
<code>false</code> else</p>
|
|
141
|
+
</li></ul>
|
|
142
|
+
|
|
143
|
+
|
|
144
|
+
|
|
145
|
+
|
|
146
|
+
<div class="method-source-code" id="is_a-3F-source">
|
|
147
|
+
<pre><span class="ruby-comment"># File lib/linmeric/CnGal_new_classes.rb, line 284</span>
|
|
148
|
+
<span class="ruby-keyword">def</span> <span class="ruby-identifier">is_a?</span>(<span class="ruby-identifier">obj</span>)
|
|
149
|
+
<span class="ruby-keyword">self</span>.<span class="ruby-identifier">class</span> <span class="ruby-operator">==</span> <span class="ruby-identifier">obj</span> <span class="ruby-operator">?</span> (<span class="ruby-keyword">return</span> <span class="ruby-keyword">true</span>) <span class="ruby-operator">:</span> (<span class="ruby-keyword">return</span> <span class="ruby-keyword">false</span>)
|
|
150
|
+
<span class="ruby-keyword">end</span></pre>
|
|
151
|
+
</div>
|
|
152
|
+
|
|
153
|
+
</div>
|
|
154
|
+
|
|
155
|
+
|
|
156
|
+
|
|
157
|
+
|
|
158
|
+
</div>
|
|
159
|
+
|
|
160
|
+
|
|
161
|
+
<div id="method-i-name" class="method-detail ">
|
|
162
|
+
|
|
163
|
+
<div class="method-heading">
|
|
164
|
+
<span class="method-name">name</span><span
|
|
165
|
+
class="method-args">()</span>
|
|
166
|
+
|
|
167
|
+
<span class="method-click-advice">click to toggle source</span>
|
|
168
|
+
|
|
169
|
+
</div>
|
|
170
|
+
|
|
171
|
+
|
|
172
|
+
<div class="method-description">
|
|
173
|
+
|
|
174
|
+
<ul><li>
|
|
175
|
+
<p>*<strong>returns</strong>*: name of the file (`String`)</p>
|
|
176
|
+
</li></ul>
|
|
177
|
+
|
|
178
|
+
|
|
179
|
+
|
|
180
|
+
|
|
181
|
+
<div class="method-source-code" id="name-source">
|
|
182
|
+
<pre><span class="ruby-comment"># File lib/linmeric/CnGal_new_classes.rb, line 272</span>
|
|
183
|
+
<span class="ruby-keyword">def</span> <span class="ruby-identifier">name</span>
|
|
184
|
+
<span class="ruby-identifier">i</span> = <span class="ruby-keyword">self</span>.<span class="ruby-identifier">size</span> <span class="ruby-operator">-</span> <span class="ruby-value">1</span>
|
|
185
|
+
<span class="ruby-identifier">nm</span> = <span class="ruby-string">''</span>
|
|
186
|
+
<span class="ruby-keyword">while</span> <span class="ruby-keyword">self</span>[<span class="ruby-identifier">i</span>] <span class="ruby-operator">!=</span> <span class="ruby-string">'/'</span> <span class="ruby-keyword">do</span>
|
|
187
|
+
<span class="ruby-identifier">nm</span> <span class="ruby-operator">+=</span> <span class="ruby-keyword">self</span>[<span class="ruby-identifier">i</span>]
|
|
188
|
+
<span class="ruby-identifier">i</span> <span class="ruby-operator">-=</span> <span class="ruby-value">1</span>
|
|
189
|
+
<span class="ruby-keyword">end</span>
|
|
190
|
+
<span class="ruby-keyword">return</span> <span class="ruby-identifier">nm</span>.<span class="ruby-identifier">reverse</span>
|
|
191
|
+
<span class="ruby-keyword">end</span></pre>
|
|
192
|
+
</div>
|
|
193
|
+
|
|
194
|
+
</div>
|
|
195
|
+
|
|
196
|
+
|
|
197
|
+
|
|
198
|
+
|
|
199
|
+
</div>
|
|
200
|
+
|
|
201
|
+
|
|
202
|
+
<div id="method-i-to_s" class="method-detail ">
|
|
203
|
+
|
|
204
|
+
<div class="method-heading">
|
|
205
|
+
<span class="method-name">to_s</span><span
|
|
206
|
+
class="method-args">()</span>
|
|
207
|
+
|
|
208
|
+
<span class="method-click-advice">click to toggle source</span>
|
|
209
|
+
|
|
210
|
+
</div>
|
|
211
|
+
|
|
212
|
+
|
|
213
|
+
<div class="method-description">
|
|
214
|
+
|
|
215
|
+
|
|
216
|
+
|
|
217
|
+
|
|
218
|
+
|
|
219
|
+
|
|
220
|
+
<div class="method-source-code" id="to_s-source">
|
|
221
|
+
<pre><span class="ruby-comment"># File lib/linmeric/CnGal_new_classes.rb, line 267</span>
|
|
222
|
+
<span class="ruby-keyword">def</span> <span class="ruby-identifier">to_s</span>
|
|
223
|
+
<span class="ruby-keyword">return</span> <span class="ruby-keyword">self</span>
|
|
224
|
+
<span class="ruby-keyword">end</span></pre>
|
|
225
|
+
</div>
|
|
226
|
+
|
|
227
|
+
</div>
|
|
228
|
+
|
|
229
|
+
|
|
230
|
+
|
|
231
|
+
|
|
232
|
+
</div>
|
|
233
|
+
|
|
234
|
+
|
|
235
|
+
</section>
|
|
236
|
+
|
|
237
|
+
</section>
|
|
238
|
+
</main>
|
|
239
|
+
|
|
240
|
+
|
|
241
|
+
<footer id="validator-badges" role="contentinfo">
|
|
242
|
+
<p><a href="http://validator.w3.org/check/referer">Validate</a>
|
|
243
|
+
<p>Generated by <a href="http://docs.seattlerb.org/rdoc/">RDoc</a> 4.2.0.
|
|
244
|
+
<p>Based on <a href="http://deveiate.org/projects/Darkfish-RDoc/">Darkfish</a> by <a href="http://deveiate.org">Michael Granger</a>.
|
|
245
|
+
</footer>
|
|
246
|
+
|