eymiha_units 0.1.0 → 1.0.0
Sign up to get free protection for your applications and to get access to all the features.
- data/gem_package.rb +4 -4
- data/html/classes/Eymiha/AmbiguousUnitsException.html +119 -0
- data/html/classes/Eymiha/MissingUnitsException.html +119 -0
- data/html/classes/Eymiha/NumericWithUnits.html +867 -0
- data/html/classes/Eymiha/NumericWithUnits.src/M000021.html +18 -0
- data/html/classes/Eymiha/NumericWithUnits.src/M000022.html +18 -0
- data/html/classes/Eymiha/NumericWithUnits.src/M000023.html +18 -0
- data/html/classes/Eymiha/NumericWithUnits.src/M000024.html +30 -0
- data/html/classes/Eymiha/NumericWithUnits.src/M000025.html +30 -0
- data/html/classes/Eymiha/NumericWithUnits.src/M000027.html +18 -0
- data/html/classes/Eymiha/NumericWithUnits.src/M000028.html +20 -0
- data/html/classes/Eymiha/NumericWithUnits.src/M000029.html +32 -0
- data/html/classes/Eymiha/NumericWithUnits.src/M000030.html +18 -0
- data/html/classes/Eymiha/NumericWithUnits.src/M000031.html +30 -0
- data/html/classes/Eymiha/NumericWithUnits.src/M000032.html +30 -0
- data/html/classes/Eymiha/NumericWithUnits.src/M000033.html +22 -0
- data/html/classes/Eymiha/NumericWithUnits.src/M000034.html +22 -0
- data/html/classes/Eymiha/NumericWithUnits.src/M000035.html +32 -0
- data/html/classes/Eymiha/NumericWithUnits.src/M000036.html +32 -0
- data/html/classes/Eymiha/NumericWithUnits.src/M000037.html +18 -0
- data/html/classes/Eymiha/NumericWithUnits.src/M000038.html +18 -0
- data/html/classes/Eymiha/NumericWithUnits.src/M000039.html +24 -0
- data/html/classes/Eymiha/NumericWithUnits.src/M000040.html +26 -0
- data/html/classes/Eymiha/NumericWithUnits.src/M000041.html +18 -0
- data/html/classes/Eymiha/NumericWithUnits.src/M000042.html +18 -0
- data/html/classes/Eymiha/NumericWithUnits.src/M000043.html +18 -0
- data/html/classes/Eymiha/NumericWithUnits.src/M000044.html +20 -0
- data/html/classes/Eymiha/NumericWithUnits.src/M000045.html +18 -0
- data/html/classes/Eymiha/NumericWithUnits.src/M000046.html +25 -0
- data/html/classes/Eymiha/NumericWithUnits.src/M000047.html +18 -0
- data/html/classes/Eymiha/NumericWithUnits.src/M000048.html +19 -0
- data/html/classes/Eymiha/Units.html +378 -0
- data/html/classes/Eymiha/Units.src/M000052.html +18 -0
- data/html/classes/Eymiha/Units.src/M000053.html +18 -0
- data/html/classes/Eymiha/Units.src/M000054.html +20 -0
- data/html/classes/Eymiha/Units.src/M000055.html +30 -0
- data/html/classes/Eymiha/Units.src/M000056.html +33 -0
- data/html/classes/Eymiha/Units.src/M000057.html +18 -0
- data/html/classes/Eymiha/Units.src/M000058.html +21 -0
- data/html/classes/Eymiha/Units.src/M000059.html +18 -0
- data/html/classes/Eymiha/Units.src/M000060.html +18 -0
- data/html/classes/Eymiha/Units.src/M000061.html +18 -0
- data/html/classes/Eymiha/Units.src/M000062.html +18 -0
- data/html/classes/Eymiha/Units.src/M000063.html +18 -0
- data/html/classes/Eymiha/Units.src/M000064.html +28 -0
- data/html/classes/Eymiha/UnitsException.html +119 -0
- data/html/classes/Eymiha/UnitsHash.html +351 -0
- data/html/classes/Eymiha/UnitsHash.src/M000002.html +18 -0
- data/html/classes/Eymiha/UnitsHash.src/M000003.html +26 -0
- data/html/classes/Eymiha/UnitsHash.src/M000004.html +25 -0
- data/html/classes/Eymiha/UnitsHash.src/M000005.html +18 -0
- data/html/classes/Eymiha/UnitsHash.src/M000006.html +18 -0
- data/html/classes/Eymiha/UnitsHash.src/M000007.html +18 -0
- data/html/classes/Eymiha/UnitsHash.src/M000008.html +22 -0
- data/html/classes/Eymiha/UnitsHash.src/M000010.html +21 -0
- data/html/classes/Eymiha/UnitsHash.src/M000011.html +19 -0
- data/html/classes/Eymiha/UnitsHash.src/M000012.html +27 -0
- data/html/classes/Eymiha/UnitsHash.src/M000013.html +18 -0
- data/html/classes/Eymiha/UnitsMeasure.html +302 -0
- data/html/classes/Eymiha/UnitsMeasure.src/M000014.html +23 -0
- data/html/classes/Eymiha/UnitsMeasure.src/M000015.html +18 -0
- data/html/classes/Eymiha/UnitsMeasure.src/M000016.html +18 -0
- data/html/classes/Eymiha/UnitsMeasure.src/M000017.html +18 -0
- data/html/classes/Eymiha/UnitsMeasure.src/M000018.html +18 -0
- data/html/classes/Eymiha/UnitsMeasure.src/M000019.html +18 -0
- data/html/classes/Eymiha/UnitsMeasure.src/M000020.html +18 -0
- data/html/classes/Eymiha/UnitsSystem.html +196 -0
- data/html/classes/Eymiha/UnitsSystem.src/M000050.html +31 -0
- data/html/classes/Eymiha/UnitsSystem.src/M000051.html +18 -0
- data/html/classes/Eymiha/UnitsUnit.html +166 -0
- data/html/classes/Eymiha/UnitsUnit.src/M000049.html +18 -0
- data/html/classes/Eymiha.html +143 -0
- data/html/classes/Numeric.html +182 -0
- data/html/classes/Numeric.src/M000001.html +50 -0
- data/html/created.rid +1 -0
- data/html/files/lib/eymiha/units/definitions/area_rb.html +101 -0
- data/html/files/lib/eymiha/units/definitions/length_rb.html +101 -0
- data/html/files/lib/eymiha/units/definitions/mass_rb.html +101 -0
- data/html/files/lib/eymiha/units/definitions/measures_rb.html +113 -0
- data/html/files/lib/eymiha/units/definitions/time_rb.html +101 -0
- data/html/files/lib/eymiha/units/definitions/velocity_rb.html +101 -0
- data/html/files/lib/eymiha/units/definitions/volume_rb.html +101 -0
- data/html/files/lib/eymiha/units/numeric_rb.html +116 -0
- data/html/files/lib/eymiha/units/numeric_with_units_rb.html +109 -0
- data/html/files/lib/eymiha/units/object_rb.html +108 -0
- data/html/files/lib/eymiha/units/units_exception_rb.html +101 -0
- data/html/files/lib/eymiha/units/units_hash_rb.html +108 -0
- data/html/files/lib/eymiha/units/units_measure_rb.html +109 -0
- data/html/files/lib/eymiha/units/units_rb.html +115 -0
- data/html/files/lib/eymiha/units/units_system_rb.html +109 -0
- data/html/files/lib/eymiha/units/units_unit_rb.html +109 -0
- data/html/files/lib/eymiha/units_rb.html +115 -0
- data/html/fr_class_index.html +37 -0
- data/html/fr_file_index.html +43 -0
- data/html/fr_method_index.html +90 -0
- data/html/index.html +24 -0
- data/html/rdoc-style.css +208 -0
- data/lib/{units → eymiha/units}/definitions/area.rb +0 -0
- data/lib/{units → eymiha/units}/definitions/length.rb +0 -0
- data/lib/{units → eymiha/units}/definitions/mass.rb +0 -0
- data/lib/eymiha/units/definitions/measures.rb +6 -0
- data/lib/{units → eymiha/units}/definitions/time.rb +0 -0
- data/lib/{units → eymiha/units}/definitions/velocity.rb +0 -0
- data/lib/{units → eymiha/units}/definitions/volume.rb +0 -0
- data/lib/{units → eymiha/units}/numeric.rb +4 -3
- data/lib/eymiha/units/numeric_with_units.rb +640 -0
- data/lib/{units → eymiha/units}/object.rb +1 -1
- data/lib/eymiha/units/units.rb +234 -0
- data/lib/eymiha/units/units_exception.rb +18 -0
- data/lib/eymiha/units/units_hash.rb +118 -0
- data/lib/eymiha/units/units_measure.rb +95 -0
- data/lib/eymiha/units/units_system.rb +89 -0
- data/lib/eymiha/units/units_unit.rb +63 -0
- data/lib/eymiha/units.rb +4 -0
- data/test/tc_definitions.rb +1 -1
- data/test/tc_formatting.rb +2 -2
- data/test/tc_formatting_derived.rb +2 -2
- data/test/tc_measure_create.rb +2 -2
- data/test/tc_measure_derive.rb +2 -2
- data/test/tc_system_create.rb +2 -2
- data/test/tc_unit_ambiguity.rb +2 -2
- data/test/tc_unit_arithmetic.rb +2 -2
- data/test/tc_unit_create.rb +2 -2
- data/test/tc_unit_derive.rb +2 -2
- data/test/tc_unit_equality.rb +2 -2
- data/test/tc_unit_forward_reference.rb +2 -2
- data/test/tc_unit_greek.rb +2 -2
- data/test/tc_unit_hash.rb +2 -2
- data/test/tc_unit_identifiers.rb +2 -2
- data/test/tc_unit_rank.rb +2 -2
- data/test/tc_uses_1.rb +2 -2
- data/test/tc_uses_2.rb +2 -2
- metadata +190 -86
- data/lib/units/definitions/measures.rb +0 -6
- data/lib/units/numeric_with_units.rb +0 -635
- data/lib/units/units.rb +0 -229
- data/lib/units/units_exception.rb +0 -14
- data/lib/units/units_hash.rb +0 -112
- data/lib/units/units_measure.rb +0 -91
- data/lib/units/units_system.rb +0 -85
- data/lib/units/units_unit.rb +0 -60
- data/lib/units.rb +0 -4
@@ -0,0 +1,18 @@
|
|
1
|
+
<?xml version="1.0" encoding="iso-8859-1"?>
|
2
|
+
<!DOCTYPE html
|
3
|
+
PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
|
4
|
+
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
5
|
+
|
6
|
+
<html>
|
7
|
+
<head>
|
8
|
+
<title>* (Eymiha::UnitsMeasure)</title>
|
9
|
+
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
|
10
|
+
<link rel="stylesheet" href="../../.././rdoc-style.css" type="text/css" media="screen" />
|
11
|
+
</head>
|
12
|
+
<body class="standalone-code">
|
13
|
+
<pre><span class="ruby-comment cmt"># File lib/eymiha/units/units_measure.rb, line 59</span>
|
14
|
+
<span class="ruby-keyword kw">def</span> <span class="ruby-operator">*</span>(<span class="ruby-identifier">factor</span>)
|
15
|
+
<span class="ruby-constant">UnitsMeasure</span>.<span class="ruby-identifier">new</span>.<span class="ruby-identifier">merge_derivation</span>(<span class="ruby-keyword kw">self</span>).<span class="ruby-identifier">merge_derivation</span>(<span class="ruby-identifier">factor</span>)
|
16
|
+
<span class="ruby-keyword kw">end</span></pre>
|
17
|
+
</body>
|
18
|
+
</html>
|
@@ -0,0 +1,18 @@
|
|
1
|
+
<?xml version="1.0" encoding="iso-8859-1"?>
|
2
|
+
<!DOCTYPE html
|
3
|
+
PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
|
4
|
+
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
5
|
+
|
6
|
+
<html>
|
7
|
+
<head>
|
8
|
+
<title>to_s (Eymiha::UnitsMeasure)</title>
|
9
|
+
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
|
10
|
+
<link rel="stylesheet" href="../../.././rdoc-style.css" type="text/css" media="screen" />
|
11
|
+
</head>
|
12
|
+
<body class="standalone-code">
|
13
|
+
<pre><span class="ruby-comment cmt"># File lib/eymiha/units/units_measure.rb, line 84</span>
|
14
|
+
<span class="ruby-keyword kw">def</span> <span class="ruby-identifier">to_s</span>
|
15
|
+
<span class="ruby-node">"#{class_name} #{names} #{keys}"</span>
|
16
|
+
<span class="ruby-keyword kw">end</span></pre>
|
17
|
+
</body>
|
18
|
+
</html>
|
@@ -0,0 +1,18 @@
|
|
1
|
+
<?xml version="1.0" encoding="iso-8859-1"?>
|
2
|
+
<!DOCTYPE html
|
3
|
+
PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
|
4
|
+
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
5
|
+
|
6
|
+
<html>
|
7
|
+
<head>
|
8
|
+
<title>format (Eymiha::UnitsMeasure)</title>
|
9
|
+
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
|
10
|
+
<link rel="stylesheet" href="../../.././rdoc-style.css" type="text/css" media="screen" />
|
11
|
+
</head>
|
12
|
+
<body class="standalone-code">
|
13
|
+
<pre><span class="ruby-comment cmt"># File lib/eymiha/units/units_measure.rb, line 89</span>
|
14
|
+
<span class="ruby-keyword kw">def</span> <span class="ruby-identifier">format</span>(<span class="ruby-identifier">options</span>)
|
15
|
+
<span class="ruby-ivar">@formats</span>[<span class="ruby-identifier">options</span>[<span class="ruby-identifier">:name</span>]] = <span class="ruby-identifier">options</span>[<span class="ruby-identifier">:format</span>]
|
16
|
+
<span class="ruby-keyword kw">end</span></pre>
|
17
|
+
</body>
|
18
|
+
</html>
|
@@ -0,0 +1,196 @@
|
|
1
|
+
<?xml version="1.0" encoding="iso-8859-1"?>
|
2
|
+
<!DOCTYPE html
|
3
|
+
PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
|
4
|
+
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
5
|
+
|
6
|
+
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
|
7
|
+
<head>
|
8
|
+
<title>Class: Eymiha::UnitsSystem</title>
|
9
|
+
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
|
10
|
+
<meta http-equiv="Content-Script-Type" content="text/javascript" />
|
11
|
+
<link rel="stylesheet" href="../.././rdoc-style.css" type="text/css" media="screen" />
|
12
|
+
<script type="text/javascript">
|
13
|
+
// <![CDATA[
|
14
|
+
|
15
|
+
function popupCode( url ) {
|
16
|
+
window.open(url, "Code", "resizable=yes,scrollbars=yes,toolbar=no,status=no,height=150,width=400")
|
17
|
+
}
|
18
|
+
|
19
|
+
function toggleCode( id ) {
|
20
|
+
if ( document.getElementById )
|
21
|
+
elem = document.getElementById( id );
|
22
|
+
else if ( document.all )
|
23
|
+
elem = eval( "document.all." + id );
|
24
|
+
else
|
25
|
+
return false;
|
26
|
+
|
27
|
+
elemStyle = elem.style;
|
28
|
+
|
29
|
+
if ( elemStyle.display != "block" ) {
|
30
|
+
elemStyle.display = "block"
|
31
|
+
} else {
|
32
|
+
elemStyle.display = "none"
|
33
|
+
}
|
34
|
+
|
35
|
+
return true;
|
36
|
+
}
|
37
|
+
|
38
|
+
// Make codeblocks hidden by default
|
39
|
+
document.writeln( "<style type=\"text/css\">div.method-source-code { display: none }</style>" )
|
40
|
+
|
41
|
+
// ]]>
|
42
|
+
</script>
|
43
|
+
|
44
|
+
</head>
|
45
|
+
<body>
|
46
|
+
|
47
|
+
|
48
|
+
|
49
|
+
<div id="classHeader">
|
50
|
+
<table class="header-table">
|
51
|
+
<tr class="top-aligned-row">
|
52
|
+
<td><strong>Class</strong></td>
|
53
|
+
<td class="class-name-in-header">Eymiha::UnitsSystem</td>
|
54
|
+
</tr>
|
55
|
+
<tr class="top-aligned-row">
|
56
|
+
<td><strong>In:</strong></td>
|
57
|
+
<td>
|
58
|
+
<a href="../../files/lib/eymiha/units/units_system_rb.html">
|
59
|
+
lib/eymiha/units/units_system.rb
|
60
|
+
</a>
|
61
|
+
<br />
|
62
|
+
</td>
|
63
|
+
</tr>
|
64
|
+
|
65
|
+
<tr class="top-aligned-row">
|
66
|
+
<td><strong>Parent:</strong></td>
|
67
|
+
<td>
|
68
|
+
MethodicHash
|
69
|
+
</td>
|
70
|
+
</tr>
|
71
|
+
</table>
|
72
|
+
</div>
|
73
|
+
<!-- banner header -->
|
74
|
+
|
75
|
+
<div id="bodyContent">
|
76
|
+
|
77
|
+
|
78
|
+
|
79
|
+
<div id="contextContent">
|
80
|
+
|
81
|
+
<div id="description">
|
82
|
+
<p>
|
83
|
+
A <a href="UnitsSystem.html">UnitsSystem</a> groups units that measure the
|
84
|
+
same quality and are conceptually organized together within a <a
|
85
|
+
href="UnitsMeasure.html">UnitsMeasure</a>. Its a MethodicHash of <a
|
86
|
+
href="UnitsSystem.html#M000050">unit</a> names to <a
|
87
|
+
href="UnitsUnit.html">UnitsUnit</a> instances.
|
88
|
+
</p>
|
89
|
+
|
90
|
+
</div>
|
91
|
+
|
92
|
+
|
93
|
+
</div>
|
94
|
+
|
95
|
+
<div id="method-list">
|
96
|
+
<h3 class="section-bar">Methods</h3>
|
97
|
+
|
98
|
+
<div class="name-list">
|
99
|
+
<a href="#M000051">format</a>
|
100
|
+
<a href="#M000050">unit</a>
|
101
|
+
</div>
|
102
|
+
</div>
|
103
|
+
|
104
|
+
</div>
|
105
|
+
|
106
|
+
|
107
|
+
<!-- if includes -->
|
108
|
+
|
109
|
+
<div id="section">
|
110
|
+
|
111
|
+
|
112
|
+
|
113
|
+
|
114
|
+
|
115
|
+
<div id="attribute-list">
|
116
|
+
<h3 class="section-bar">Attributes</h3>
|
117
|
+
|
118
|
+
<div class="name-list">
|
119
|
+
<table>
|
120
|
+
<tr class="top-aligned-row context-row">
|
121
|
+
<td class="context-item-name">name</td>
|
122
|
+
<td class="context-item-value"> [R] </td>
|
123
|
+
<td class="context-item-desc">
|
124
|
+
The name of this <a href="UnitsSystem.html">UnitsSystem</a>
|
125
|
+
|
126
|
+
</td>
|
127
|
+
</tr>
|
128
|
+
<tr class="top-aligned-row context-row">
|
129
|
+
<td class="context-item-name">units_measure</td>
|
130
|
+
<td class="context-item-value"> [R] </td>
|
131
|
+
<td class="context-item-desc">
|
132
|
+
The <a href="UnitsMeasure.html">UnitsMeasure</a> to which this instance is
|
133
|
+
associated.
|
134
|
+
|
135
|
+
</td>
|
136
|
+
</tr>
|
137
|
+
</table>
|
138
|
+
</div>
|
139
|
+
</div>
|
140
|
+
|
141
|
+
|
142
|
+
|
143
|
+
<!-- if method_list -->
|
144
|
+
<div id="methods">
|
145
|
+
<h3 class="section-bar">Public Instance methods</h3>
|
146
|
+
|
147
|
+
<div id="method-M000051" class="method-detail">
|
148
|
+
<a name="M000051"></a>
|
149
|
+
|
150
|
+
<div class="method-heading">
|
151
|
+
<a href="UnitsSystem.src/M000051.html" target="Code" class="method-signature"
|
152
|
+
onclick="popupCode('UnitsSystem.src/M000051.html');return false;">
|
153
|
+
<span class="method-name">format</span><span class="method-args">(options)</span>
|
154
|
+
</a>
|
155
|
+
</div>
|
156
|
+
|
157
|
+
<div class="method-description">
|
158
|
+
<p>
|
159
|
+
Associates the name of a <a href="UnitsSystem.html#M000051">format</a> with
|
160
|
+
an output formatter in the instance‘s <a
|
161
|
+
href="UnitsMeasure.html">UnitsMeasure</a>.
|
162
|
+
</p>
|
163
|
+
</div>
|
164
|
+
</div>
|
165
|
+
|
166
|
+
<div id="method-M000050" class="method-detail">
|
167
|
+
<a name="M000050"></a>
|
168
|
+
|
169
|
+
<div class="method-heading">
|
170
|
+
<a href="UnitsSystem.src/M000050.html" target="Code" class="method-signature"
|
171
|
+
onclick="popupCode('UnitsSystem.src/M000050.html');return false;">
|
172
|
+
<span class="method-name">unit</span><span class="method-args">(attributes)</span>
|
173
|
+
</a>
|
174
|
+
</div>
|
175
|
+
|
176
|
+
<div class="method-description">
|
177
|
+
<p>
|
178
|
+
Defines a new <a href="UnitsUnit.html">UnitsUnit</a>. If ten-based or
|
179
|
+
two-based greeking is defined, it is applied.
|
180
|
+
</p>
|
181
|
+
</div>
|
182
|
+
</div>
|
183
|
+
|
184
|
+
|
185
|
+
</div>
|
186
|
+
|
187
|
+
|
188
|
+
</div>
|
189
|
+
|
190
|
+
|
191
|
+
<div id="validator-badges">
|
192
|
+
<p><small><a href="http://validator.w3.org/check/referer">[Validate]</a></small></p>
|
193
|
+
</div>
|
194
|
+
|
195
|
+
</body>
|
196
|
+
</html>
|
@@ -0,0 +1,31 @@
|
|
1
|
+
<?xml version="1.0" encoding="iso-8859-1"?>
|
2
|
+
<!DOCTYPE html
|
3
|
+
PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
|
4
|
+
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
5
|
+
|
6
|
+
<html>
|
7
|
+
<head>
|
8
|
+
<title>unit (Eymiha::UnitsSystem)</title>
|
9
|
+
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
|
10
|
+
<link rel="stylesheet" href="../../.././rdoc-style.css" type="text/css" media="screen" />
|
11
|
+
</head>
|
12
|
+
<body class="standalone-code">
|
13
|
+
<pre><span class="ruby-comment cmt"># File lib/eymiha/units/units_system.rb, line 23</span>
|
14
|
+
<span class="ruby-keyword kw">def</span> <span class="ruby-identifier">unit</span>(<span class="ruby-identifier">attributes</span>)
|
15
|
+
<span class="ruby-identifier">unit</span> = <span class="ruby-keyword kw">nil</span>
|
16
|
+
<span class="ruby-keyword kw">if</span> <span class="ruby-operator">!</span><span class="ruby-constant">Units</span>.<span class="ruby-identifier">holding_forward_reference?</span>
|
17
|
+
<span class="ruby-identifier">unit</span> = <span class="ruby-constant">UnitsUnit</span>.<span class="ruby-identifier">new</span> <span class="ruby-keyword kw">self</span>, <span class="ruby-identifier">attributes</span>
|
18
|
+
<span class="ruby-keyword kw">self</span>[<span class="ruby-identifier">unit</span>.<span class="ruby-identifier">name</span>] = <span class="ruby-identifier">unit</span>
|
19
|
+
<span class="ruby-constant">Units</span>.<span class="ruby-identifier">add_unit</span> <span class="ruby-identifier">unit</span>
|
20
|
+
<span class="ruby-keyword kw">case</span> <span class="ruby-identifier">unit</span>.<span class="ruby-identifier">greek</span>
|
21
|
+
<span class="ruby-keyword kw">when</span> <span class="ruby-identifier">:ten</span> <span class="ruby-keyword kw">then</span> <span class="ruby-identifier">greek_ten</span> <span class="ruby-identifier">unit</span>
|
22
|
+
<span class="ruby-keyword kw">when</span> <span class="ruby-identifier">:two</span> <span class="ruby-keyword kw">then</span> <span class="ruby-identifier">greek_two</span> <span class="ruby-identifier">unit</span>
|
23
|
+
<span class="ruby-keyword kw">end</span>
|
24
|
+
<span class="ruby-keyword kw">else</span>
|
25
|
+
<span class="ruby-constant">Units</span>.<span class="ruby-identifier">hold_forward_reference</span> <span class="ruby-keyword kw">nil</span>
|
26
|
+
<span class="ruby-keyword kw">end</span>
|
27
|
+
<span class="ruby-constant">Units</span>.<span class="ruby-identifier">continue_forward_reference_resolution</span>
|
28
|
+
<span class="ruby-identifier">unit</span>
|
29
|
+
<span class="ruby-keyword kw">end</span></pre>
|
30
|
+
</body>
|
31
|
+
</html>
|
@@ -0,0 +1,18 @@
|
|
1
|
+
<?xml version="1.0" encoding="iso-8859-1"?>
|
2
|
+
<!DOCTYPE html
|
3
|
+
PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
|
4
|
+
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
5
|
+
|
6
|
+
<html>
|
7
|
+
<head>
|
8
|
+
<title>format (Eymiha::UnitsSystem)</title>
|
9
|
+
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
|
10
|
+
<link rel="stylesheet" href="../../.././rdoc-style.css" type="text/css" media="screen" />
|
11
|
+
</head>
|
12
|
+
<body class="standalone-code">
|
13
|
+
<pre><span class="ruby-comment cmt"># File lib/eymiha/units/units_system.rb, line 42</span>
|
14
|
+
<span class="ruby-keyword kw">def</span> <span class="ruby-identifier">format</span>(<span class="ruby-identifier">options</span>)
|
15
|
+
<span class="ruby-ivar">@units_measure</span>.<span class="ruby-identifier">format</span>(<span class="ruby-identifier">options</span>)
|
16
|
+
<span class="ruby-keyword kw">end</span></pre>
|
17
|
+
</body>
|
18
|
+
</html>
|
@@ -0,0 +1,166 @@
|
|
1
|
+
<?xml version="1.0" encoding="iso-8859-1"?>
|
2
|
+
<!DOCTYPE html
|
3
|
+
PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
|
4
|
+
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
5
|
+
|
6
|
+
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
|
7
|
+
<head>
|
8
|
+
<title>Class: Eymiha::UnitsUnit</title>
|
9
|
+
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
|
10
|
+
<meta http-equiv="Content-Script-Type" content="text/javascript" />
|
11
|
+
<link rel="stylesheet" href="../.././rdoc-style.css" type="text/css" media="screen" />
|
12
|
+
<script type="text/javascript">
|
13
|
+
// <![CDATA[
|
14
|
+
|
15
|
+
function popupCode( url ) {
|
16
|
+
window.open(url, "Code", "resizable=yes,scrollbars=yes,toolbar=no,status=no,height=150,width=400")
|
17
|
+
}
|
18
|
+
|
19
|
+
function toggleCode( id ) {
|
20
|
+
if ( document.getElementById )
|
21
|
+
elem = document.getElementById( id );
|
22
|
+
else if ( document.all )
|
23
|
+
elem = eval( "document.all." + id );
|
24
|
+
else
|
25
|
+
return false;
|
26
|
+
|
27
|
+
elemStyle = elem.style;
|
28
|
+
|
29
|
+
if ( elemStyle.display != "block" ) {
|
30
|
+
elemStyle.display = "block"
|
31
|
+
} else {
|
32
|
+
elemStyle.display = "none"
|
33
|
+
}
|
34
|
+
|
35
|
+
return true;
|
36
|
+
}
|
37
|
+
|
38
|
+
// Make codeblocks hidden by default
|
39
|
+
document.writeln( "<style type=\"text/css\">div.method-source-code { display: none }</style>" )
|
40
|
+
|
41
|
+
// ]]>
|
42
|
+
</script>
|
43
|
+
|
44
|
+
</head>
|
45
|
+
<body>
|
46
|
+
|
47
|
+
|
48
|
+
|
49
|
+
<div id="classHeader">
|
50
|
+
<table class="header-table">
|
51
|
+
<tr class="top-aligned-row">
|
52
|
+
<td><strong>Class</strong></td>
|
53
|
+
<td class="class-name-in-header">Eymiha::UnitsUnit</td>
|
54
|
+
</tr>
|
55
|
+
<tr class="top-aligned-row">
|
56
|
+
<td><strong>In:</strong></td>
|
57
|
+
<td>
|
58
|
+
<a href="../../files/lib/eymiha/units/units_unit_rb.html">
|
59
|
+
lib/eymiha/units/units_unit.rb
|
60
|
+
</a>
|
61
|
+
<br />
|
62
|
+
</td>
|
63
|
+
</tr>
|
64
|
+
|
65
|
+
<tr class="top-aligned-row">
|
66
|
+
<td><strong>Parent:</strong></td>
|
67
|
+
<td>
|
68
|
+
MethodicHash
|
69
|
+
</td>
|
70
|
+
</tr>
|
71
|
+
</table>
|
72
|
+
</div>
|
73
|
+
<!-- banner header -->
|
74
|
+
|
75
|
+
<div id="bodyContent">
|
76
|
+
|
77
|
+
|
78
|
+
|
79
|
+
<div id="contextContent">
|
80
|
+
|
81
|
+
<div id="description">
|
82
|
+
<p>
|
83
|
+
A unit in the context of a particular <a
|
84
|
+
href="UnitsSystem.html">UnitsSystem</a>. It‘s a MethodicHash of its
|
85
|
+
named qualities.
|
86
|
+
</p>
|
87
|
+
|
88
|
+
</div>
|
89
|
+
|
90
|
+
|
91
|
+
</div>
|
92
|
+
|
93
|
+
<div id="method-list">
|
94
|
+
<h3 class="section-bar">Methods</h3>
|
95
|
+
|
96
|
+
<div class="name-list">
|
97
|
+
<a href="#M000049">units_measure</a>
|
98
|
+
</div>
|
99
|
+
</div>
|
100
|
+
|
101
|
+
</div>
|
102
|
+
|
103
|
+
|
104
|
+
<!-- if includes -->
|
105
|
+
|
106
|
+
<div id="section">
|
107
|
+
|
108
|
+
|
109
|
+
|
110
|
+
|
111
|
+
|
112
|
+
<div id="attribute-list">
|
113
|
+
<h3 class="section-bar">Attributes</h3>
|
114
|
+
|
115
|
+
<div class="name-list">
|
116
|
+
<table>
|
117
|
+
<tr class="top-aligned-row context-row">
|
118
|
+
<td class="context-item-name">units_system</td>
|
119
|
+
<td class="context-item-value"> [R] </td>
|
120
|
+
<td class="context-item-desc">
|
121
|
+
The <a href="UnitsSystem.html">UnitsSystem</a> to which this instance is
|
122
|
+
associated.
|
123
|
+
|
124
|
+
</td>
|
125
|
+
</tr>
|
126
|
+
</table>
|
127
|
+
</div>
|
128
|
+
</div>
|
129
|
+
|
130
|
+
|
131
|
+
|
132
|
+
<!-- if method_list -->
|
133
|
+
<div id="methods">
|
134
|
+
<h3 class="section-bar">Public Instance methods</h3>
|
135
|
+
|
136
|
+
<div id="method-M000049" class="method-detail">
|
137
|
+
<a name="M000049"></a>
|
138
|
+
|
139
|
+
<div class="method-heading">
|
140
|
+
<a href="UnitsUnit.src/M000049.html" target="Code" class="method-signature"
|
141
|
+
onclick="popupCode('UnitsUnit.src/M000049.html');return false;">
|
142
|
+
<span class="method-name">units_measure</span><span class="method-args">()</span>
|
143
|
+
</a>
|
144
|
+
</div>
|
145
|
+
|
146
|
+
<div class="method-description">
|
147
|
+
<p>
|
148
|
+
returns the <a href="UnitsMeasure.html">UnitsMeasure</a> containing the <a
|
149
|
+
href="UnitsSystem.html">UnitsSystem</a> to which this instance belongs.
|
150
|
+
</p>
|
151
|
+
</div>
|
152
|
+
</div>
|
153
|
+
|
154
|
+
|
155
|
+
</div>
|
156
|
+
|
157
|
+
|
158
|
+
</div>
|
159
|
+
|
160
|
+
|
161
|
+
<div id="validator-badges">
|
162
|
+
<p><small><a href="http://validator.w3.org/check/referer">[Validate]</a></small></p>
|
163
|
+
</div>
|
164
|
+
|
165
|
+
</body>
|
166
|
+
</html>
|
@@ -0,0 +1,18 @@
|
|
1
|
+
<?xml version="1.0" encoding="iso-8859-1"?>
|
2
|
+
<!DOCTYPE html
|
3
|
+
PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
|
4
|
+
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
5
|
+
|
6
|
+
<html>
|
7
|
+
<head>
|
8
|
+
<title>units_measure (Eymiha::UnitsUnit)</title>
|
9
|
+
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
|
10
|
+
<link rel="stylesheet" href="../../.././rdoc-style.css" type="text/css" media="screen" />
|
11
|
+
</head>
|
12
|
+
<body class="standalone-code">
|
13
|
+
<pre><span class="ruby-comment cmt"># File lib/eymiha/units/units_unit.rb, line 57</span>
|
14
|
+
<span class="ruby-keyword kw">def</span> <span class="ruby-identifier">units_measure</span>
|
15
|
+
<span class="ruby-identifier">units_system</span>.<span class="ruby-identifier">units_measure</span>
|
16
|
+
<span class="ruby-keyword kw">end</span></pre>
|
17
|
+
</body>
|
18
|
+
</html>
|
@@ -0,0 +1,143 @@
|
|
1
|
+
<?xml version="1.0" encoding="iso-8859-1"?>
|
2
|
+
<!DOCTYPE html
|
3
|
+
PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
|
4
|
+
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
5
|
+
|
6
|
+
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
|
7
|
+
<head>
|
8
|
+
<title>Module: Eymiha</title>
|
9
|
+
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
|
10
|
+
<meta http-equiv="Content-Script-Type" content="text/javascript" />
|
11
|
+
<link rel="stylesheet" href=".././rdoc-style.css" type="text/css" media="screen" />
|
12
|
+
<script type="text/javascript">
|
13
|
+
// <![CDATA[
|
14
|
+
|
15
|
+
function popupCode( url ) {
|
16
|
+
window.open(url, "Code", "resizable=yes,scrollbars=yes,toolbar=no,status=no,height=150,width=400")
|
17
|
+
}
|
18
|
+
|
19
|
+
function toggleCode( id ) {
|
20
|
+
if ( document.getElementById )
|
21
|
+
elem = document.getElementById( id );
|
22
|
+
else if ( document.all )
|
23
|
+
elem = eval( "document.all." + id );
|
24
|
+
else
|
25
|
+
return false;
|
26
|
+
|
27
|
+
elemStyle = elem.style;
|
28
|
+
|
29
|
+
if ( elemStyle.display != "block" ) {
|
30
|
+
elemStyle.display = "block"
|
31
|
+
} else {
|
32
|
+
elemStyle.display = "none"
|
33
|
+
}
|
34
|
+
|
35
|
+
return true;
|
36
|
+
}
|
37
|
+
|
38
|
+
// Make codeblocks hidden by default
|
39
|
+
document.writeln( "<style type=\"text/css\">div.method-source-code { display: none }</style>" )
|
40
|
+
|
41
|
+
// ]]>
|
42
|
+
</script>
|
43
|
+
|
44
|
+
</head>
|
45
|
+
<body>
|
46
|
+
|
47
|
+
|
48
|
+
|
49
|
+
<div id="classHeader">
|
50
|
+
<table class="header-table">
|
51
|
+
<tr class="top-aligned-row">
|
52
|
+
<td><strong>Module</strong></td>
|
53
|
+
<td class="class-name-in-header">Eymiha</td>
|
54
|
+
</tr>
|
55
|
+
<tr class="top-aligned-row">
|
56
|
+
<td><strong>In:</strong></td>
|
57
|
+
<td>
|
58
|
+
<a href="../files/lib/eymiha/units/numeric_with_units_rb.html">
|
59
|
+
lib/eymiha/units/numeric_with_units.rb
|
60
|
+
</a>
|
61
|
+
<br />
|
62
|
+
<a href="../files/lib/eymiha/units/units_rb.html">
|
63
|
+
lib/eymiha/units/units.rb
|
64
|
+
</a>
|
65
|
+
<br />
|
66
|
+
<a href="../files/lib/eymiha/units/units_exception_rb.html">
|
67
|
+
lib/eymiha/units/units_exception.rb
|
68
|
+
</a>
|
69
|
+
<br />
|
70
|
+
<a href="../files/lib/eymiha/units/units_hash_rb.html">
|
71
|
+
lib/eymiha/units/units_hash.rb
|
72
|
+
</a>
|
73
|
+
<br />
|
74
|
+
<a href="../files/lib/eymiha/units/units_measure_rb.html">
|
75
|
+
lib/eymiha/units/units_measure.rb
|
76
|
+
</a>
|
77
|
+
<br />
|
78
|
+
<a href="../files/lib/eymiha/units/units_system_rb.html">
|
79
|
+
lib/eymiha/units/units_system.rb
|
80
|
+
</a>
|
81
|
+
<br />
|
82
|
+
<a href="../files/lib/eymiha/units/units_unit_rb.html">
|
83
|
+
lib/eymiha/units/units_unit.rb
|
84
|
+
</a>
|
85
|
+
<br />
|
86
|
+
</td>
|
87
|
+
</tr>
|
88
|
+
|
89
|
+
</table>
|
90
|
+
</div>
|
91
|
+
<!-- banner header -->
|
92
|
+
|
93
|
+
<div id="bodyContent">
|
94
|
+
|
95
|
+
|
96
|
+
|
97
|
+
<div id="contextContent">
|
98
|
+
|
99
|
+
|
100
|
+
|
101
|
+
</div>
|
102
|
+
|
103
|
+
|
104
|
+
</div>
|
105
|
+
|
106
|
+
|
107
|
+
<!-- if includes -->
|
108
|
+
|
109
|
+
<div id="section">
|
110
|
+
|
111
|
+
<div id="class-list">
|
112
|
+
<h3 class="section-bar">Classes and Modules</h3>
|
113
|
+
|
114
|
+
Class <a href="Eymiha/AmbiguousUnitsException.html" class="link">Eymiha::AmbiguousUnitsException</a><br />
|
115
|
+
Class <a href="Eymiha/MissingUnitsException.html" class="link">Eymiha::MissingUnitsException</a><br />
|
116
|
+
Class <a href="Eymiha/NumericWithUnits.html" class="link">Eymiha::NumericWithUnits</a><br />
|
117
|
+
Class <a href="Eymiha/Units.html" class="link">Eymiha::Units</a><br />
|
118
|
+
Class <a href="Eymiha/UnitsException.html" class="link">Eymiha::UnitsException</a><br />
|
119
|
+
Class <a href="Eymiha/UnitsHash.html" class="link">Eymiha::UnitsHash</a><br />
|
120
|
+
Class <a href="Eymiha/UnitsMeasure.html" class="link">Eymiha::UnitsMeasure</a><br />
|
121
|
+
Class <a href="Eymiha/UnitsSystem.html" class="link">Eymiha::UnitsSystem</a><br />
|
122
|
+
Class <a href="Eymiha/UnitsUnit.html" class="link">Eymiha::UnitsUnit</a><br />
|
123
|
+
|
124
|
+
</div>
|
125
|
+
|
126
|
+
|
127
|
+
|
128
|
+
|
129
|
+
|
130
|
+
|
131
|
+
|
132
|
+
<!-- if method_list -->
|
133
|
+
|
134
|
+
|
135
|
+
</div>
|
136
|
+
|
137
|
+
|
138
|
+
<div id="validator-badges">
|
139
|
+
<p><small><a href="http://validator.w3.org/check/referer">[Validate]</a></small></p>
|
140
|
+
</div>
|
141
|
+
|
142
|
+
</body>
|
143
|
+
</html>
|