sdl4r 0.9.4 → 0.9.5
Sign up to get free protection for your applications and to get access to all the features.
- data/CHANGELOG +28 -0
- data/README +9 -0
- data/Rakefile +3 -2
- data/TODO +78 -0
- data/doc/classes/SDL4R.html +207 -53
- data/doc/classes/SDL4R/Parser.html +111 -49
- data/doc/classes/SDL4R/SdlBinary.html +125 -65
- data/doc/classes/SDL4R/SdlParseError.html +52 -30
- data/doc/classes/SDL4R/SdlTimeSpan.html +497 -279
- data/doc/classes/SDL4R/Tag.html +866 -514
- data/doc/created.rid +1 -1
- data/doc/files/CHANGELOG.html +52 -25
- data/doc/files/LICENSE.html +43 -52
- data/doc/files/README.html +52 -43
- data/doc/files/lib/sdl4r/parser/reader_rb.html +16 -27
- data/doc/files/lib/sdl4r/parser/time_span_with_zone_rb.html +17 -21
- data/doc/files/lib/sdl4r/parser/token_rb.html +17 -21
- data/doc/files/lib/sdl4r/parser/tokenizer_rb.html +17 -21
- data/doc/files/lib/sdl4r/parser_rb.html +21 -22
- data/doc/files/lib/sdl4r/sdl4r_rb.html +25 -25
- data/doc/files/lib/sdl4r/sdl_binary_rb.html +17 -21
- data/doc/files/lib/sdl4r/sdl_parse_error_rb.html +17 -21
- data/doc/files/lib/sdl4r/sdl_time_span_rb.html +17 -21
- data/doc/files/lib/sdl4r/tag_rb.html +25 -24
- data/doc/files/lib/sdl4r_rb.html +17 -21
- data/doc/fr_class_index.html +15 -12
- data/doc/fr_file_index.html +23 -12
- data/doc/fr_method_index.html +176 -91
- data/doc/index.html +7 -10
- data/doc/rdoc-style.css +210 -119
- data/lib/sdl4r.rb +3 -0
- data/lib/sdl4r/parser.rb +3 -5
- data/lib/sdl4r/parser/reader.rb +3 -3
- data/lib/sdl4r/parser/time_span_with_zone.rb +3 -0
- data/lib/sdl4r/parser/token.rb +3 -0
- data/lib/sdl4r/parser/tokenizer.rb +3 -0
- data/lib/sdl4r/sdl4r.rb +20 -8
- data/lib/sdl4r/sdl_binary.rb +3 -0
- data/lib/sdl4r/sdl_parse_error.rb +3 -0
- data/lib/sdl4r/sdl_time_span.rb +3 -0
- data/lib/sdl4r/tag.rb +18 -4
- data/test/sdl4r/parser_test.rb +7 -2
- data/test/sdl4r/sdl4r_test.rb +6 -2
- data/test/sdl4r/sdl_test.rb +3 -0
- data/test/sdl4r/tag_test.rb +3 -0
- metadata +72 -74
- data/TODO.txt +0 -177
@@ -1,12 +1,9 @@
|
|
1
|
-
|
2
|
-
|
3
|
-
PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
|
4
|
-
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
5
|
-
|
1
|
+
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
|
2
|
+
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
|
6
3
|
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
|
7
4
|
<head>
|
8
|
-
<title>Class: SDL4R::SdlParseError</title>
|
9
|
-
<meta http-equiv="Content-Type" content="text/html; charset=
|
5
|
+
<title>Class: SDL4R::SdlParseError [RDoc: Simple Declarative Language for Ruby]</title>
|
6
|
+
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
|
10
7
|
<meta http-equiv="Content-Script-Type" content="text/javascript" />
|
11
8
|
<link rel="stylesheet" href="../.././rdoc-style.css" type="text/css" media="screen" />
|
12
9
|
<script type="text/javascript">
|
@@ -25,7 +22,7 @@
|
|
25
22
|
return false;
|
26
23
|
|
27
24
|
elemStyle = elem.style;
|
28
|
-
|
25
|
+
|
29
26
|
if ( elemStyle.display != "block" ) {
|
30
27
|
elemStyle.display = "block"
|
31
28
|
} else {
|
@@ -34,10 +31,10 @@
|
|
34
31
|
|
35
32
|
return true;
|
36
33
|
}
|
37
|
-
|
34
|
+
|
38
35
|
// Make codeblocks hidden by default
|
39
|
-
document.writeln( "<style type=\"text/css\">div.method-source-code { display: none }
|
40
|
-
|
36
|
+
document.writeln( "<style type=\"text/css\">div.method-source-code { display: none }<\/style>" )
|
37
|
+
|
41
38
|
// ]]>
|
42
39
|
</script>
|
43
40
|
|
@@ -45,7 +42,6 @@
|
|
45
42
|
<body>
|
46
43
|
|
47
44
|
|
48
|
-
|
49
45
|
<div id="classHeader">
|
50
46
|
<table class="header-table">
|
51
47
|
<tr class="top-aligned-row">
|
@@ -55,93 +51,115 @@
|
|
55
51
|
<tr class="top-aligned-row">
|
56
52
|
<td><strong>In:</strong></td>
|
57
53
|
<td>
|
54
|
+
|
55
|
+
|
58
56
|
<a href="../../files/lib/sdl4r/sdl_parse_error_rb.html">
|
57
|
+
|
59
58
|
lib/sdl4r/sdl_parse_error.rb
|
59
|
+
|
60
60
|
</a>
|
61
|
+
|
62
|
+
|
61
63
|
<br />
|
64
|
+
|
62
65
|
</td>
|
63
66
|
</tr>
|
64
67
|
|
68
|
+
|
65
69
|
<tr class="top-aligned-row">
|
66
70
|
<td><strong>Parent:</strong></td>
|
67
71
|
<td>
|
72
|
+
|
68
73
|
StandardError
|
74
|
+
|
69
75
|
</td>
|
70
76
|
</tr>
|
77
|
+
|
71
78
|
</table>
|
72
79
|
</div>
|
73
80
|
<!-- banner header -->
|
74
81
|
|
75
82
|
<div id="bodyContent">
|
76
83
|
|
77
|
-
|
78
|
-
|
79
84
|
<div id="contextContent">
|
80
85
|
|
81
86
|
<div id="description">
|
82
87
|
<p>
|
83
|
-
An exception describing a problem with an SDL document&#
|
88
|
+
An exception describing a problem with an SDL document’s structure
|
84
89
|
</p>
|
85
90
|
|
86
91
|
</div>
|
87
92
|
|
88
|
-
|
89
93
|
</div>
|
90
94
|
|
95
|
+
|
91
96
|
<div id="method-list">
|
92
97
|
<h3 class="section-bar">Methods</h3>
|
93
98
|
|
94
99
|
<div class="name-list">
|
95
|
-
|
100
|
+
|
101
|
+
<a href="#M000037">new</a>
|
102
|
+
|
96
103
|
</div>
|
97
104
|
</div>
|
98
105
|
|
99
106
|
</div>
|
100
107
|
|
101
|
-
|
102
108
|
<!-- if includes -->
|
103
109
|
|
104
110
|
<div id="section">
|
105
111
|
|
106
112
|
|
107
113
|
|
108
|
-
|
109
|
-
|
110
114
|
<div id="attribute-list">
|
111
115
|
<h3 class="section-bar">Attributes</h3>
|
112
116
|
|
113
117
|
<div class="name-list">
|
114
118
|
<table>
|
119
|
+
|
115
120
|
<tr class="top-aligned-row context-row">
|
116
121
|
<td class="context-item-name">line</td>
|
122
|
+
|
117
123
|
<td class="context-item-value"> [R] </td>
|
124
|
+
|
118
125
|
<td class="context-item-desc"></td>
|
119
126
|
</tr>
|
127
|
+
|
120
128
|
<tr class="top-aligned-row context-row">
|
121
129
|
<td class="context-item-name">position</td>
|
130
|
+
|
122
131
|
<td class="context-item-value"> [R] </td>
|
132
|
+
|
123
133
|
<td class="context-item-desc"></td>
|
124
134
|
</tr>
|
135
|
+
|
125
136
|
</table>
|
126
137
|
</div>
|
127
138
|
</div>
|
128
|
-
|
129
139
|
|
130
140
|
|
131
141
|
<!-- if method_list -->
|
142
|
+
|
132
143
|
<div id="methods">
|
144
|
+
|
133
145
|
<h3 class="section-bar">Public Class methods</h3>
|
134
146
|
|
135
|
-
|
136
|
-
|
147
|
+
|
148
|
+
<div id="method-M000037" class="method-detail">
|
149
|
+
<a name="M000037"></a>
|
137
150
|
|
138
151
|
<div class="method-heading">
|
139
|
-
|
152
|
+
|
153
|
+
<a href="#M000037" class="method-signature">
|
154
|
+
|
140
155
|
<span class="method-name">new</span><span class="method-args">(description, line_no, position, line = nil)</span>
|
156
|
+
|
141
157
|
</a>
|
158
|
+
|
142
159
|
</div>
|
143
|
-
|
160
|
+
|
144
161
|
<div class="method-description">
|
162
|
+
|
145
163
|
<p>
|
146
164
|
Note: Line and positioning numbering start with 1 rather than 0 to be
|
147
165
|
consistent with most editors.
|
@@ -151,11 +169,12 @@ consistent with most editors.
|
|
151
169
|
on which the error occured or -1 for unknown <tt>position</tt> The position
|
152
170
|
(within the line) where the error occured or -1 for unknown
|
153
171
|
</p>
|
172
|
+
|
154
173
|
<p><a class="source-toggle" href="#"
|
155
|
-
onclick="toggleCode('
|
156
|
-
<div class="method-source-code" id="
|
174
|
+
onclick="toggleCode('M000037-source');return false;">[Source]</a></p>
|
175
|
+
<div class="method-source-code" id="M000037-source">
|
157
176
|
<pre>
|
158
|
-
<span class="ruby-comment cmt"># File lib/sdl4r/sdl_parse_error.rb, line
|
177
|
+
<span class="ruby-comment cmt"># File lib/sdl4r/sdl_parse_error.rb, line 36</span>
|
159
178
|
<span class="ruby-keyword kw">def</span> <span class="ruby-identifier">initialize</span>(<span class="ruby-identifier">description</span>, <span class="ruby-identifier">line_no</span>, <span class="ruby-identifier">position</span>, <span class="ruby-identifier">line</span> = <span class="ruby-keyword kw">nil</span>)
|
160
179
|
<span class="ruby-keyword kw">super</span>(
|
161
180
|
<span class="ruby-node">"#{description} Line "</span> <span class="ruby-operator">+</span> ((<span class="ruby-identifier">line_no</span>.<span class="ruby-identifier">nil?</span> <span class="ruby-keyword kw">or</span> <span class="ruby-identifier">line_no</span> <span class="ruby-operator"><</span> <span class="ruby-value">0</span>)<span class="ruby-operator">?</span> <span class="ruby-value str">"unknown"</span> <span class="ruby-operator">:</span> <span class="ruby-identifier">line_no</span>.<span class="ruby-identifier">to_s</span>) <span class="ruby-operator">+</span>
|
@@ -167,19 +186,22 @@ on which the error occured or -1 for unknown <tt>position</tt> The position
|
|
167
186
|
<span class="ruby-keyword kw">end</span>
|
168
187
|
</pre>
|
169
188
|
</div>
|
189
|
+
|
170
190
|
</div>
|
171
191
|
</div>
|
172
192
|
|
173
193
|
|
194
|
+
|
174
195
|
</div>
|
175
196
|
|
176
197
|
|
177
|
-
</div>
|
178
198
|
|
179
199
|
|
200
|
+
</div>
|
201
|
+
|
180
202
|
<div id="validator-badges">
|
181
203
|
<p><small><a href="http://validator.w3.org/check/referer">[Validate]</a></small></p>
|
182
204
|
</div>
|
183
205
|
|
184
206
|
</body>
|
185
|
-
</html>
|
207
|
+
</html>
|
@@ -1,12 +1,9 @@
|
|
1
|
-
|
2
|
-
|
3
|
-
PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
|
4
|
-
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
5
|
-
|
1
|
+
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
|
2
|
+
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
|
6
3
|
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
|
7
4
|
<head>
|
8
|
-
<title>Class: SDL4R::SdlTimeSpan</title>
|
9
|
-
<meta http-equiv="Content-Type" content="text/html; charset=
|
5
|
+
<title>Class: SDL4R::SdlTimeSpan [RDoc: Simple Declarative Language for Ruby]</title>
|
6
|
+
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
|
10
7
|
<meta http-equiv="Content-Script-Type" content="text/javascript" />
|
11
8
|
<link rel="stylesheet" href="../.././rdoc-style.css" type="text/css" media="screen" />
|
12
9
|
<script type="text/javascript">
|
@@ -25,7 +22,7 @@
|
|
25
22
|
return false;
|
26
23
|
|
27
24
|
elemStyle = elem.style;
|
28
|
-
|
25
|
+
|
29
26
|
if ( elemStyle.display != "block" ) {
|
30
27
|
elemStyle.display = "block"
|
31
28
|
} else {
|
@@ -34,10 +31,10 @@
|
|
34
31
|
|
35
32
|
return true;
|
36
33
|
}
|
37
|
-
|
34
|
+
|
38
35
|
// Make codeblocks hidden by default
|
39
|
-
document.writeln( "<style type=\"text/css\">div.method-source-code { display: none }
|
40
|
-
|
36
|
+
document.writeln( "<style type=\"text/css\">div.method-source-code { display: none }<\/style>" )
|
37
|
+
|
41
38
|
// ]]>
|
42
39
|
</script>
|
43
40
|
|
@@ -45,7 +42,6 @@
|
|
45
42
|
<body>
|
46
43
|
|
47
44
|
|
48
|
-
|
49
45
|
<div id="classHeader">
|
50
46
|
<table class="header-table">
|
51
47
|
<tr class="top-aligned-row">
|
@@ -55,27 +51,36 @@
|
|
55
51
|
<tr class="top-aligned-row">
|
56
52
|
<td><strong>In:</strong></td>
|
57
53
|
<td>
|
54
|
+
|
55
|
+
|
58
56
|
<a href="../../files/lib/sdl4r/sdl_time_span_rb.html">
|
57
|
+
|
59
58
|
lib/sdl4r/sdl_time_span.rb
|
59
|
+
|
60
60
|
</a>
|
61
|
+
|
62
|
+
|
61
63
|
<br />
|
64
|
+
|
62
65
|
</td>
|
63
66
|
</tr>
|
64
67
|
|
68
|
+
|
65
69
|
<tr class="top-aligned-row">
|
66
70
|
<td><strong>Parent:</strong></td>
|
67
71
|
<td>
|
72
|
+
|
68
73
|
Object
|
74
|
+
|
69
75
|
</td>
|
70
76
|
</tr>
|
77
|
+
|
71
78
|
</table>
|
72
79
|
</div>
|
73
80
|
<!-- banner header -->
|
74
81
|
|
75
82
|
<div id="bodyContent">
|
76
83
|
|
77
|
-
|
78
|
-
|
79
84
|
<div id="contextContent">
|
80
85
|
|
81
86
|
<div id="description">
|
@@ -86,106 +91,150 @@ time (which would be represented using a Date, DateTime or Time instance).
|
|
86
91
|
|
87
92
|
</div>
|
88
93
|
|
89
|
-
|
90
94
|
</div>
|
91
95
|
|
96
|
+
|
92
97
|
<div id="method-list">
|
93
98
|
<h3 class="section-bar">Methods</h3>
|
94
99
|
|
95
100
|
<div class="name-list">
|
96
|
-
|
97
|
-
|
98
|
-
|
99
|
-
|
100
|
-
|
101
|
-
|
102
|
-
|
103
|
-
|
104
|
-
|
105
|
-
|
106
|
-
|
107
|
-
|
108
|
-
|
109
|
-
|
110
|
-
|
111
|
-
|
112
|
-
|
113
|
-
|
114
|
-
|
115
|
-
|
116
|
-
|
117
|
-
|
118
|
-
|
119
|
-
|
120
|
-
|
121
|
-
|
122
|
-
|
101
|
+
|
102
|
+
<a href="#M000035"><=></a>
|
103
|
+
|
104
|
+
<a href="#M000034">==</a>
|
105
|
+
|
106
|
+
<a href="#M000013">day</a>
|
107
|
+
|
108
|
+
<a href="#M000012">days</a>
|
109
|
+
|
110
|
+
<a href="#M000033">eql?</a>
|
111
|
+
|
112
|
+
<a href="#M000032">hash</a>
|
113
|
+
|
114
|
+
<a href="#M000015">hour</a>
|
115
|
+
|
116
|
+
<a href="#M000014">hours</a>
|
117
|
+
|
118
|
+
<a href="#M000020">milliseconds</a>
|
119
|
+
|
120
|
+
<a href="#M000017">min</a>
|
121
|
+
|
122
|
+
<a href="#M000016">minutes</a>
|
123
|
+
|
124
|
+
<a href="#M000026">negate</a>
|
125
|
+
|
126
|
+
<a href="#M000010">new</a>
|
127
|
+
|
128
|
+
<a href="#M000027">roll_days</a>
|
129
|
+
|
130
|
+
<a href="#M000028">roll_hours</a>
|
131
|
+
|
132
|
+
<a href="#M000031">roll_milliseconds</a>
|
133
|
+
|
134
|
+
<a href="#M000029">roll_minutes</a>
|
135
|
+
|
136
|
+
<a href="#M000030">roll_seconds</a>
|
137
|
+
|
138
|
+
<a href="#M000019">sec</a>
|
139
|
+
|
140
|
+
<a href="#M000018">seconds</a>
|
141
|
+
|
142
|
+
<a href="#M000011">sign</a>
|
143
|
+
|
144
|
+
<a href="#M000036">to_s</a>
|
145
|
+
|
146
|
+
<a href="#M000022">total_hours</a>
|
147
|
+
|
148
|
+
<a href="#M000025">total_milliseconds</a>
|
149
|
+
|
150
|
+
<a href="#M000023">total_minutes</a>
|
151
|
+
|
152
|
+
<a href="#M000024">total_seconds</a>
|
153
|
+
|
154
|
+
<a href="#M000021">usec</a>
|
155
|
+
|
123
156
|
</div>
|
124
157
|
</div>
|
125
158
|
|
126
159
|
</div>
|
127
160
|
|
128
|
-
|
129
161
|
<!-- if includes -->
|
162
|
+
|
130
163
|
<div id="includes">
|
131
164
|
<h3 class="section-bar">Included Modules</h3>
|
132
165
|
|
133
166
|
<div id="includes-list">
|
167
|
+
|
134
168
|
<span class="include-name">Comparable</span>
|
169
|
+
|
135
170
|
</div>
|
136
171
|
</div>
|
137
172
|
|
138
173
|
<div id="section">
|
139
174
|
|
140
|
-
|
141
175
|
<div id="constants-list">
|
142
176
|
<h3 class="section-bar">Constants</h3>
|
143
177
|
|
144
178
|
<div class="name-list">
|
145
179
|
<table summary="Constants">
|
180
|
+
|
146
181
|
<tr class="top-aligned-row context-row">
|
147
182
|
<td class="context-item-name">MILLISECONDS_IN_SECOND</td>
|
148
183
|
<td>=</td>
|
149
184
|
<td class="context-item-value">1000</td>
|
185
|
+
|
150
186
|
</tr>
|
187
|
+
|
151
188
|
<tr class="top-aligned-row context-row">
|
152
189
|
<td class="context-item-name">MILLISECONDS_IN_MINUTE</td>
|
153
190
|
<td>=</td>
|
154
191
|
<td class="context-item-value">60 * MILLISECONDS_IN_SECOND</td>
|
192
|
+
|
155
193
|
</tr>
|
194
|
+
|
156
195
|
<tr class="top-aligned-row context-row">
|
157
196
|
<td class="context-item-name">MILLISECONDS_IN_HOUR</td>
|
158
197
|
<td>=</td>
|
159
198
|
<td class="context-item-value">60 * MILLISECONDS_IN_MINUTE</td>
|
199
|
+
|
160
200
|
</tr>
|
201
|
+
|
161
202
|
<tr class="top-aligned-row context-row">
|
162
203
|
<td class="context-item-name">MILLISECONDS_IN_DAY</td>
|
163
204
|
<td>=</td>
|
164
205
|
<td class="context-item-value">24 * MILLISECONDS_IN_HOUR</td>
|
206
|
+
|
165
207
|
</tr>
|
208
|
+
|
166
209
|
</table>
|
167
210
|
</div>
|
168
211
|
</div>
|
169
212
|
|
170
213
|
|
171
214
|
|
172
|
-
|
173
|
-
|
174
215
|
|
175
216
|
<!-- if method_list -->
|
217
|
+
|
176
218
|
<div id="methods">
|
219
|
+
|
177
220
|
<h3 class="section-bar">Public Class methods</h3>
|
178
221
|
|
179
|
-
|
180
|
-
|
222
|
+
|
223
|
+
<div id="method-M000010" class="method-detail">
|
224
|
+
<a name="M000010"></a>
|
181
225
|
|
182
226
|
<div class="method-heading">
|
183
|
-
|
227
|
+
|
228
|
+
<a href="#M000010" class="method-signature">
|
229
|
+
|
184
230
|
<span class="method-name">new</span><span class="method-args">(*args)</span>
|
231
|
+
|
185
232
|
</a>
|
233
|
+
|
186
234
|
</div>
|
187
|
-
|
235
|
+
|
188
236
|
<div class="method-description">
|
237
|
+
|
189
238
|
<p>
|
190
239
|
Create an <a href="SdlTimeSpan.html">SdlTimeSpan</a>. Note: if the timespan
|
191
240
|
is negative all components should be negative.
|
@@ -199,11 +248,12 @@ or
|
|
199
248
|
<pre>
|
200
249
|
SdlTimeSpan.new(totalMilliseconds)
|
201
250
|
</pre>
|
251
|
+
|
202
252
|
<p><a class="source-toggle" href="#"
|
203
|
-
onclick="toggleCode('
|
204
|
-
<div class="method-source-code" id="
|
253
|
+
onclick="toggleCode('M000010-source');return false;">[Source]</a></p>
|
254
|
+
<div class="method-source-code" id="M000010-source">
|
205
255
|
<pre>
|
206
|
-
<span class="ruby-comment cmt"># File lib/sdl4r/sdl_time_span.rb, line
|
256
|
+
<span class="ruby-comment cmt"># File lib/sdl4r/sdl_time_span.rb, line 76</span>
|
207
257
|
<span class="ruby-keyword kw">def</span> <span class="ruby-identifier">initialize</span>(<span class="ruby-operator">*</span><span class="ruby-identifier">args</span>)
|
208
258
|
<span class="ruby-keyword kw">if</span> <span class="ruby-identifier">args</span>.<span class="ruby-identifier">length</span> <span class="ruby-operator">==</span> <span class="ruby-value">1</span>
|
209
259
|
<span class="ruby-identifier">initialize_total_milliseconds</span>(<span class="ruby-identifier">args</span>[<span class="ruby-value">0</span>])
|
@@ -213,198 +263,261 @@ or
|
|
213
263
|
<span class="ruby-keyword kw">end</span>
|
214
264
|
</pre>
|
215
265
|
</div>
|
266
|
+
|
216
267
|
</div>
|
217
268
|
</div>
|
218
269
|
|
270
|
+
|
219
271
|
<h3 class="section-bar">Public Instance methods</h3>
|
220
272
|
|
221
|
-
|
222
|
-
|
273
|
+
|
274
|
+
<div id="method-M000035" class="method-detail">
|
275
|
+
<a name="M000035"></a>
|
223
276
|
|
224
277
|
<div class="method-heading">
|
225
|
-
|
278
|
+
|
279
|
+
<a href="#M000035" class="method-signature">
|
280
|
+
|
226
281
|
<span class="method-name"><=></span><span class="method-args">(other)</span>
|
282
|
+
|
227
283
|
</a>
|
284
|
+
|
228
285
|
</div>
|
229
|
-
|
286
|
+
|
230
287
|
<div class="method-description">
|
288
|
+
|
231
289
|
<p><a class="source-toggle" href="#"
|
232
|
-
onclick="toggleCode('
|
233
|
-
<div class="method-source-code" id="
|
290
|
+
onclick="toggleCode('M000035-source');return false;">[Source]</a></p>
|
291
|
+
<div class="method-source-code" id="M000035-source">
|
234
292
|
<pre>
|
235
|
-
<span class="ruby-comment cmt"># File lib/sdl4r/sdl_time_span.rb, line
|
293
|
+
<span class="ruby-comment cmt"># File lib/sdl4r/sdl_time_span.rb, line 229</span>
|
236
294
|
<span class="ruby-keyword kw">def</span> <span class="ruby-operator"><=></span>(<span class="ruby-identifier">other</span>)
|
237
295
|
<span class="ruby-ivar">@totalMilliseconds</span> <span class="ruby-operator"><=></span> <span class="ruby-identifier">other</span>.<span class="ruby-identifier">total_milliseconds</span>
|
238
296
|
<span class="ruby-keyword kw">end</span>
|
239
297
|
</pre>
|
240
298
|
</div>
|
299
|
+
|
241
300
|
</div>
|
242
301
|
</div>
|
243
302
|
|
244
|
-
|
245
|
-
|
303
|
+
|
304
|
+
<div id="method-M000034" class="method-detail">
|
305
|
+
<a name="M000034"></a>
|
246
306
|
|
247
307
|
<div class="method-heading">
|
308
|
+
|
248
309
|
<span class="method-name">==</span><span class="method-args">(other)</span>
|
310
|
+
|
249
311
|
</div>
|
250
|
-
|
312
|
+
|
251
313
|
<div class="method-description">
|
314
|
+
|
252
315
|
<p>
|
253
|
-
Alias for eql
|
316
|
+
Alias for <a href="SdlTimeSpan.html#M000033">eql?</a>
|
254
317
|
</p>
|
318
|
+
|
255
319
|
</div>
|
256
320
|
</div>
|
257
321
|
|
258
|
-
|
259
|
-
|
322
|
+
|
323
|
+
<div id="method-M000013" class="method-detail">
|
324
|
+
<a name="M000013"></a>
|
260
325
|
|
261
326
|
<div class="method-heading">
|
327
|
+
|
262
328
|
<span class="method-name">day</span><span class="method-args">()</span>
|
329
|
+
|
263
330
|
</div>
|
264
|
-
|
331
|
+
|
265
332
|
<div class="method-description">
|
333
|
+
|
266
334
|
<p>
|
267
|
-
Alias for <a href="SdlTimeSpan.html#
|
335
|
+
Alias for <a href="SdlTimeSpan.html#M000012">days</a>
|
268
336
|
</p>
|
337
|
+
|
269
338
|
</div>
|
270
339
|
</div>
|
271
340
|
|
272
|
-
|
273
|
-
|
341
|
+
|
342
|
+
<div id="method-M000012" class="method-detail">
|
343
|
+
<a name="M000012"></a>
|
274
344
|
|
275
345
|
<div class="method-heading">
|
276
|
-
|
346
|
+
|
347
|
+
<a href="#M000012" class="method-signature">
|
348
|
+
|
277
349
|
<span class="method-name">days</span><span class="method-args">()</span>
|
350
|
+
|
278
351
|
</a>
|
352
|
+
|
279
353
|
</div>
|
280
|
-
|
354
|
+
|
281
355
|
<div class="method-description">
|
356
|
+
|
282
357
|
<p>
|
283
|
-
The
|
358
|
+
The days component.
|
284
359
|
</p>
|
360
|
+
|
285
361
|
<p><a class="source-toggle" href="#"
|
286
|
-
onclick="toggleCode('
|
287
|
-
<div class="method-source-code" id="
|
362
|
+
onclick="toggleCode('M000012-source');return false;">[Source]</a></p>
|
363
|
+
<div class="method-source-code" id="M000012-source">
|
288
364
|
<pre>
|
289
|
-
<span class="ruby-comment cmt"># File lib/sdl4r/sdl_time_span.rb, line
|
365
|
+
<span class="ruby-comment cmt"># File lib/sdl4r/sdl_time_span.rb, line 92</span>
|
290
366
|
<span class="ruby-keyword kw">def</span> <span class="ruby-identifier">days</span>
|
291
367
|
<span class="ruby-identifier">sign</span> <span class="ruby-operator">*</span> (<span class="ruby-ivar">@totalMilliseconds</span>.<span class="ruby-identifier">abs</span> <span class="ruby-operator">/</span> <span class="ruby-constant">MILLISECONDS_IN_DAY</span>)
|
292
368
|
<span class="ruby-keyword kw">end</span>
|
293
369
|
</pre>
|
294
370
|
</div>
|
371
|
+
|
295
372
|
</div>
|
296
373
|
</div>
|
297
374
|
|
298
|
-
|
299
|
-
|
375
|
+
|
376
|
+
<div id="method-M000033" class="method-detail">
|
377
|
+
<a name="M000033"></a>
|
300
378
|
|
301
379
|
<div class="method-heading">
|
302
|
-
|
380
|
+
|
381
|
+
<a href="#M000033" class="method-signature">
|
382
|
+
|
303
383
|
<span class="method-name">eql?</span><span class="method-args">(other)</span>
|
384
|
+
|
304
385
|
</a>
|
386
|
+
|
305
387
|
</div>
|
306
|
-
|
388
|
+
|
307
389
|
<div class="method-description">
|
390
|
+
|
308
391
|
<p>
|
309
392
|
Tests for equivalence.
|
310
393
|
</p>
|
394
|
+
|
311
395
|
<p><a class="source-toggle" href="#"
|
312
|
-
onclick="toggleCode('
|
313
|
-
<div class="method-source-code" id="
|
396
|
+
onclick="toggleCode('M000033-source');return false;">[Source]</a></p>
|
397
|
+
<div class="method-source-code" id="M000033-source">
|
314
398
|
<pre>
|
315
|
-
<span class="ruby-comment cmt"># File lib/sdl4r/sdl_time_span.rb, line
|
399
|
+
<span class="ruby-comment cmt"># File lib/sdl4r/sdl_time_span.rb, line 222</span>
|
316
400
|
<span class="ruby-keyword kw">def</span> <span class="ruby-identifier">eql?</span>(<span class="ruby-identifier">other</span>)
|
317
401
|
<span class="ruby-identifier">other</span>.<span class="ruby-identifier">is_a?</span>(<span class="ruby-constant">SdlTimeSpan</span>) <span class="ruby-keyword kw">and</span> <span class="ruby-ivar">@totalMilliseconds</span> <span class="ruby-operator">==</span> <span class="ruby-identifier">other</span>.<span class="ruby-identifier">total_milliseconds</span>
|
318
402
|
<span class="ruby-keyword kw">end</span>
|
319
403
|
</pre>
|
320
404
|
</div>
|
405
|
+
|
321
406
|
</div>
|
322
407
|
</div>
|
323
408
|
|
324
|
-
|
325
|
-
|
409
|
+
|
410
|
+
<div id="method-M000032" class="method-detail">
|
411
|
+
<a name="M000032"></a>
|
326
412
|
|
327
413
|
<div class="method-heading">
|
328
|
-
|
414
|
+
|
415
|
+
<a href="#M000032" class="method-signature">
|
416
|
+
|
329
417
|
<span class="method-name">hash</span><span class="method-args">()</span>
|
418
|
+
|
330
419
|
</a>
|
420
|
+
|
331
421
|
</div>
|
332
|
-
|
422
|
+
|
333
423
|
<div class="method-description">
|
424
|
+
|
334
425
|
<p>
|
335
426
|
A hashcode based on the canonical string representation.
|
336
427
|
</p>
|
428
|
+
|
337
429
|
<p><a class="source-toggle" href="#"
|
338
|
-
onclick="toggleCode('
|
339
|
-
<div class="method-source-code" id="
|
430
|
+
onclick="toggleCode('M000032-source');return false;">[Source]</a></p>
|
431
|
+
<div class="method-source-code" id="M000032-source">
|
340
432
|
<pre>
|
341
|
-
<span class="ruby-comment cmt"># File lib/sdl4r/sdl_time_span.rb, line
|
433
|
+
<span class="ruby-comment cmt"># File lib/sdl4r/sdl_time_span.rb, line 216</span>
|
342
434
|
<span class="ruby-keyword kw">def</span> <span class="ruby-identifier">hash</span>
|
343
435
|
<span class="ruby-identifier">to_s</span>.<span class="ruby-identifier">hash</span>
|
344
436
|
<span class="ruby-keyword kw">end</span>
|
345
437
|
</pre>
|
346
438
|
</div>
|
439
|
+
|
347
440
|
</div>
|
348
441
|
</div>
|
349
442
|
|
350
|
-
|
351
|
-
|
443
|
+
|
444
|
+
<div id="method-M000015" class="method-detail">
|
445
|
+
<a name="M000015"></a>
|
352
446
|
|
353
447
|
<div class="method-heading">
|
448
|
+
|
354
449
|
<span class="method-name">hour</span><span class="method-args">()</span>
|
450
|
+
|
355
451
|
</div>
|
356
|
-
|
452
|
+
|
357
453
|
<div class="method-description">
|
454
|
+
|
358
455
|
<p>
|
359
|
-
Alias for <a href="SdlTimeSpan.html#
|
456
|
+
Alias for <a href="SdlTimeSpan.html#M000014">hours</a>
|
360
457
|
</p>
|
458
|
+
|
361
459
|
</div>
|
362
460
|
</div>
|
363
461
|
|
364
|
-
|
365
|
-
|
462
|
+
|
463
|
+
<div id="method-M000014" class="method-detail">
|
464
|
+
<a name="M000014"></a>
|
366
465
|
|
367
466
|
<div class="method-heading">
|
368
|
-
|
467
|
+
|
468
|
+
<a href="#M000014" class="method-signature">
|
469
|
+
|
369
470
|
<span class="method-name">hours</span><span class="method-args">()</span>
|
471
|
+
|
370
472
|
</a>
|
473
|
+
|
371
474
|
</div>
|
372
|
-
|
475
|
+
|
373
476
|
<div class="method-description">
|
477
|
+
|
374
478
|
<p>
|
375
|
-
The
|
479
|
+
The hours component.
|
376
480
|
</p>
|
481
|
+
|
377
482
|
<p><a class="source-toggle" href="#"
|
378
|
-
onclick="toggleCode('
|
379
|
-
<div class="method-source-code" id="
|
483
|
+
onclick="toggleCode('M000014-source');return false;">[Source]</a></p>
|
484
|
+
<div class="method-source-code" id="M000014-source">
|
380
485
|
<pre>
|
381
|
-
<span class="ruby-comment cmt"># File lib/sdl4r/sdl_time_span.rb, line
|
486
|
+
<span class="ruby-comment cmt"># File lib/sdl4r/sdl_time_span.rb, line 99</span>
|
382
487
|
<span class="ruby-keyword kw">def</span> <span class="ruby-identifier">hours</span>
|
383
488
|
<span class="ruby-keyword kw">return</span> <span class="ruby-identifier">sign</span> <span class="ruby-operator">*</span> ((<span class="ruby-ivar">@totalMilliseconds</span> <span class="ruby-operator">-</span> (<span class="ruby-identifier">days</span> <span class="ruby-operator">*</span> <span class="ruby-constant">MILLISECONDS_IN_DAY</span>)).<span class="ruby-identifier">abs</span> <span class="ruby-operator">/</span> <span class="ruby-constant">MILLISECONDS_IN_HOUR</span>)
|
384
489
|
<span class="ruby-keyword kw">end</span>
|
385
490
|
</pre>
|
386
491
|
</div>
|
492
|
+
|
387
493
|
</div>
|
388
494
|
</div>
|
389
495
|
|
390
|
-
|
391
|
-
|
496
|
+
|
497
|
+
<div id="method-M000020" class="method-detail">
|
498
|
+
<a name="M000020"></a>
|
392
499
|
|
393
500
|
<div class="method-heading">
|
394
|
-
|
501
|
+
|
502
|
+
<a href="#M000020" class="method-signature">
|
503
|
+
|
395
504
|
<span class="method-name">milliseconds</span><span class="method-args">()</span>
|
505
|
+
|
396
506
|
</a>
|
507
|
+
|
397
508
|
</div>
|
398
|
-
|
509
|
+
|
399
510
|
<div class="method-description">
|
511
|
+
|
400
512
|
<p>
|
401
|
-
The
|
513
|
+
The milliseconds component.
|
402
514
|
</p>
|
515
|
+
|
403
516
|
<p><a class="source-toggle" href="#"
|
404
|
-
onclick="toggleCode('
|
405
|
-
<div class="method-source-code" id="
|
517
|
+
onclick="toggleCode('M000020-source');return false;">[Source]</a></p>
|
518
|
+
<div class="method-source-code" id="M000020-source">
|
406
519
|
<pre>
|
407
|
-
<span class="ruby-comment cmt"># File lib/sdl4r/sdl_time_span.rb, line
|
520
|
+
<span class="ruby-comment cmt"># File lib/sdl4r/sdl_time_span.rb, line 125</span>
|
408
521
|
<span class="ruby-keyword kw">def</span> <span class="ruby-identifier">milliseconds</span>
|
409
522
|
<span class="ruby-keyword kw">return</span> <span class="ruby-ivar">@totalMilliseconds</span> <span class="ruby-operator">-</span>
|
410
523
|
(<span class="ruby-identifier">days</span> <span class="ruby-operator">*</span> <span class="ruby-constant">MILLISECONDS_IN_DAY</span>) <span class="ruby-operator">-</span>
|
@@ -414,41 +527,54 @@ The <a href="SdlTimeSpan.html#M000072">milliseconds</a> component.
|
|
414
527
|
<span class="ruby-keyword kw">end</span>
|
415
528
|
</pre>
|
416
529
|
</div>
|
530
|
+
|
417
531
|
</div>
|
418
532
|
</div>
|
419
533
|
|
420
|
-
|
421
|
-
|
534
|
+
|
535
|
+
<div id="method-M000017" class="method-detail">
|
536
|
+
<a name="M000017"></a>
|
422
537
|
|
423
538
|
<div class="method-heading">
|
539
|
+
|
424
540
|
<span class="method-name">min</span><span class="method-args">()</span>
|
541
|
+
|
425
542
|
</div>
|
426
|
-
|
543
|
+
|
427
544
|
<div class="method-description">
|
545
|
+
|
428
546
|
<p>
|
429
|
-
Alias for <a href="SdlTimeSpan.html#
|
547
|
+
Alias for <a href="SdlTimeSpan.html#M000016">minutes</a>
|
430
548
|
</p>
|
549
|
+
|
431
550
|
</div>
|
432
551
|
</div>
|
433
552
|
|
434
|
-
|
435
|
-
|
553
|
+
|
554
|
+
<div id="method-M000016" class="method-detail">
|
555
|
+
<a name="M000016"></a>
|
436
556
|
|
437
557
|
<div class="method-heading">
|
438
|
-
|
558
|
+
|
559
|
+
<a href="#M000016" class="method-signature">
|
560
|
+
|
439
561
|
<span class="method-name">minutes</span><span class="method-args">()</span>
|
562
|
+
|
440
563
|
</a>
|
564
|
+
|
441
565
|
</div>
|
442
|
-
|
566
|
+
|
443
567
|
<div class="method-description">
|
568
|
+
|
444
569
|
<p>
|
445
|
-
The
|
570
|
+
The minutes component.
|
446
571
|
</p>
|
572
|
+
|
447
573
|
<p><a class="source-toggle" href="#"
|
448
|
-
onclick="toggleCode('
|
449
|
-
<div class="method-source-code" id="
|
574
|
+
onclick="toggleCode('M000016-source');return false;">[Source]</a></p>
|
575
|
+
<div class="method-source-code" id="M000016-source">
|
450
576
|
<pre>
|
451
|
-
<span class="ruby-comment cmt"># File lib/sdl4r/sdl_time_span.rb, line
|
577
|
+
<span class="ruby-comment cmt"># File lib/sdl4r/sdl_time_span.rb, line 106</span>
|
452
578
|
<span class="ruby-keyword kw">def</span> <span class="ruby-identifier">minutes</span>
|
453
579
|
<span class="ruby-keyword kw">return</span> <span class="ruby-identifier">sign</span> <span class="ruby-operator">*</span>
|
454
580
|
((<span class="ruby-ivar">@totalMilliseconds</span> <span class="ruby-operator">-</span> (<span class="ruby-identifier">days</span> <span class="ruby-operator">*</span> <span class="ruby-constant">MILLISECONDS_IN_DAY</span>) <span class="ruby-operator">-</span> (<span class="ruby-identifier">hours</span> <span class="ruby-operator">*</span> <span class="ruby-constant">MILLISECONDS_IN_HOUR</span>)).<span class="ruby-identifier">abs</span> <span class="ruby-operator">/</span>
|
@@ -456,245 +582,289 @@ The <a href="SdlTimeSpan.html#M000068">minutes</a> component.
|
|
456
582
|
<span class="ruby-keyword kw">end</span>
|
457
583
|
</pre>
|
458
584
|
</div>
|
585
|
+
|
459
586
|
</div>
|
460
587
|
</div>
|
461
588
|
|
462
|
-
|
463
|
-
|
589
|
+
|
590
|
+
<div id="method-M000026" class="method-detail">
|
591
|
+
<a name="M000026"></a>
|
464
592
|
|
465
593
|
<div class="method-heading">
|
466
|
-
|
594
|
+
|
595
|
+
<a href="#M000026" class="method-signature">
|
596
|
+
|
467
597
|
<span class="method-name">negate</span><span class="method-args">()</span>
|
598
|
+
|
468
599
|
</a>
|
600
|
+
|
469
601
|
</div>
|
470
|
-
|
602
|
+
|
471
603
|
<div class="method-description">
|
604
|
+
|
472
605
|
<p>
|
473
|
-
Returns an <a href="SdlTimeSpan.html
|
474
|
-
|
475
|
-
this instance
|
606
|
+
Returns an new <a href="SdlTimeSpan.html">SdlTimeSpan</a> instance that is
|
607
|
+
the opposite of this instance
|
476
608
|
</p>
|
609
|
+
|
477
610
|
<p><a class="source-toggle" href="#"
|
478
|
-
onclick="toggleCode('
|
479
|
-
<div class="method-source-code" id="
|
611
|
+
onclick="toggleCode('M000026-source');return false;">[Source]</a></p>
|
612
|
+
<div class="method-source-code" id="M000026-source">
|
480
613
|
<pre>
|
481
|
-
<span class="ruby-comment cmt"># File lib/sdl4r/sdl_time_span.rb, line
|
614
|
+
<span class="ruby-comment cmt"># File lib/sdl4r/sdl_time_span.rb, line 165</span>
|
482
615
|
<span class="ruby-keyword kw">def</span> <span class="ruby-identifier">negate</span>
|
483
616
|
<span class="ruby-constant">SdlTimeSpan</span>.<span class="ruby-identifier">new</span>(<span class="ruby-operator">-</span><span class="ruby-ivar">@totalMilliseconds</span>)
|
484
617
|
<span class="ruby-keyword kw">end</span>
|
485
618
|
</pre>
|
486
619
|
</div>
|
620
|
+
|
487
621
|
</div>
|
488
622
|
</div>
|
489
623
|
|
490
|
-
|
491
|
-
|
624
|
+
|
625
|
+
<div id="method-M000027" class="method-detail">
|
626
|
+
<a name="M000027"></a>
|
492
627
|
|
493
628
|
<div class="method-heading">
|
494
|
-
|
629
|
+
|
630
|
+
<a href="#M000027" class="method-signature">
|
631
|
+
|
495
632
|
<span class="method-name">roll_days</span><span class="method-args">(days)</span>
|
633
|
+
|
496
634
|
</a>
|
635
|
+
|
497
636
|
</div>
|
498
|
-
|
637
|
+
|
499
638
|
<div class="method-description">
|
639
|
+
|
500
640
|
<p>
|
501
|
-
Return a
|
502
|
-
|
503
|
-
Positive numbers add <a href="SdlTimeSpan.html#M000064">days</a>. Negative
|
504
|
-
numbers remove <a href="SdlTimeSpan.html#M000064">days</a>.
|
641
|
+
Return a new instance with the days adjusted by the given amount. Positive
|
642
|
+
numbers add days. Negative numbers remove days.
|
505
643
|
</p>
|
506
644
|
<table>
|
507
|
-
<tr><td valign="top"><tt
|
508
|
-
subtract)
|
645
|
+
<tr><td valign="top"><tt>days</tt>:</td><td>The adjustment (days to add or subtract)
|
509
646
|
|
510
647
|
</td></tr>
|
511
648
|
</table>
|
649
|
+
|
512
650
|
<p><a class="source-toggle" href="#"
|
513
|
-
onclick="toggleCode('
|
514
|
-
<div class="method-source-code" id="
|
651
|
+
onclick="toggleCode('M000027-source');return false;">[Source]</a></p>
|
652
|
+
<div class="method-source-code" id="M000027-source">
|
515
653
|
<pre>
|
516
|
-
<span class="ruby-comment cmt"># File lib/sdl4r/sdl_time_span.rb, line
|
654
|
+
<span class="ruby-comment cmt"># File lib/sdl4r/sdl_time_span.rb, line 174</span>
|
517
655
|
<span class="ruby-keyword kw">def</span> <span class="ruby-identifier">roll_days</span>(<span class="ruby-identifier">days</span>)
|
518
656
|
<span class="ruby-constant">SdlTimeSpan</span>.<span class="ruby-identifier">new</span>(<span class="ruby-ivar">@totalMilliseconds</span> <span class="ruby-operator">+</span> (<span class="ruby-identifier">days</span> <span class="ruby-operator">*</span> <span class="ruby-constant">MILLISECONDS_IN_DAY</span>))
|
519
657
|
<span class="ruby-keyword kw">end</span>
|
520
658
|
</pre>
|
521
659
|
</div>
|
660
|
+
|
522
661
|
</div>
|
523
662
|
</div>
|
524
663
|
|
525
|
-
|
526
|
-
|
664
|
+
|
665
|
+
<div id="method-M000028" class="method-detail">
|
666
|
+
<a name="M000028"></a>
|
527
667
|
|
528
668
|
<div class="method-heading">
|
529
|
-
|
669
|
+
|
670
|
+
<a href="#M000028" class="method-signature">
|
671
|
+
|
530
672
|
<span class="method-name">roll_hours</span><span class="method-args">(hours)</span>
|
673
|
+
|
531
674
|
</a>
|
675
|
+
|
532
676
|
</div>
|
533
|
-
|
677
|
+
|
534
678
|
<div class="method-description">
|
679
|
+
|
535
680
|
<p>
|
536
|
-
Return a
|
537
|
-
|
538
|
-
Positive numbers add <a href="SdlTimeSpan.html#M000066">hours</a>. Negative
|
539
|
-
numbers remove <a href="SdlTimeSpan.html#M000066">hours</a>.
|
681
|
+
Return a new instance with the hours adjusted by the given amount. Positive
|
682
|
+
numbers add hours. Negative numbers remove hours.
|
540
683
|
</p>
|
541
684
|
<table>
|
542
|
-
<tr><td valign="top"><tt
|
543
|
-
subtract)
|
685
|
+
<tr><td valign="top"><tt>hours</tt>:</td><td>The adjustment (hours to add or subtract)
|
544
686
|
|
545
687
|
</td></tr>
|
546
688
|
</table>
|
689
|
+
|
547
690
|
<p><a class="source-toggle" href="#"
|
548
|
-
onclick="toggleCode('
|
549
|
-
<div class="method-source-code" id="
|
691
|
+
onclick="toggleCode('M000028-source');return false;">[Source]</a></p>
|
692
|
+
<div class="method-source-code" id="M000028-source">
|
550
693
|
<pre>
|
551
|
-
<span class="ruby-comment cmt"># File lib/sdl4r/sdl_time_span.rb, line
|
694
|
+
<span class="ruby-comment cmt"># File lib/sdl4r/sdl_time_span.rb, line 183</span>
|
552
695
|
<span class="ruby-keyword kw">def</span> <span class="ruby-identifier">roll_hours</span>(<span class="ruby-identifier">hours</span>)
|
553
696
|
<span class="ruby-constant">SdlTimeSpan</span>.<span class="ruby-identifier">new</span>(<span class="ruby-ivar">@totalMilliseconds</span> <span class="ruby-operator">+</span> (<span class="ruby-identifier">hours</span> <span class="ruby-operator">*</span> <span class="ruby-constant">MILLISECONDS_IN_HOUR</span>))
|
554
697
|
<span class="ruby-keyword kw">end</span>
|
555
698
|
</pre>
|
556
699
|
</div>
|
700
|
+
|
557
701
|
</div>
|
558
702
|
</div>
|
559
703
|
|
560
|
-
|
561
|
-
|
704
|
+
|
705
|
+
<div id="method-M000031" class="method-detail">
|
706
|
+
<a name="M000031"></a>
|
562
707
|
|
563
708
|
<div class="method-heading">
|
564
|
-
|
709
|
+
|
710
|
+
<a href="#M000031" class="method-signature">
|
711
|
+
|
565
712
|
<span class="method-name">roll_milliseconds</span><span class="method-args">(milliseconds)</span>
|
713
|
+
|
566
714
|
</a>
|
715
|
+
|
567
716
|
</div>
|
568
|
-
|
717
|
+
|
569
718
|
<div class="method-description">
|
719
|
+
|
570
720
|
<p>
|
571
|
-
Return a
|
572
|
-
|
573
|
-
amount. Positive numbers add <a
|
574
|
-
href="SdlTimeSpan.html#M000072">milliseconds</a>. Negative numbers remove
|
575
|
-
<a href="SdlTimeSpan.html#M000072">milliseconds</a>.
|
721
|
+
Return a new instance with the milliseconds adjusted by the given amount.
|
722
|
+
Positive numbers add milliseconds. Negative numbers remove milliseconds.
|
576
723
|
</p>
|
577
724
|
<table>
|
578
|
-
<tr><td valign="top"><tt
|
579
|
-
or subtract)
|
725
|
+
<tr><td valign="top"><tt>milliseconds</tt>:</td><td>The adjustment (milliseconds to add or subtract)
|
580
726
|
|
581
727
|
</td></tr>
|
582
728
|
</table>
|
729
|
+
|
583
730
|
<p><a class="source-toggle" href="#"
|
584
|
-
onclick="toggleCode('
|
585
|
-
<div class="method-source-code" id="
|
731
|
+
onclick="toggleCode('M000031-source');return false;">[Source]</a></p>
|
732
|
+
<div class="method-source-code" id="M000031-source">
|
586
733
|
<pre>
|
587
|
-
<span class="ruby-comment cmt"># File lib/sdl4r/sdl_time_span.rb, line
|
734
|
+
<span class="ruby-comment cmt"># File lib/sdl4r/sdl_time_span.rb, line 210</span>
|
588
735
|
<span class="ruby-keyword kw">def</span> <span class="ruby-identifier">roll_milliseconds</span>(<span class="ruby-identifier">milliseconds</span>)
|
589
736
|
<span class="ruby-constant">SdlTimeSpan</span>.<span class="ruby-identifier">new</span>(<span class="ruby-ivar">@totalMilliseconds</span> <span class="ruby-operator">+</span> <span class="ruby-identifier">milliseconds</span>)
|
590
737
|
<span class="ruby-keyword kw">end</span>
|
591
738
|
</pre>
|
592
739
|
</div>
|
740
|
+
|
593
741
|
</div>
|
594
742
|
</div>
|
595
743
|
|
596
|
-
|
597
|
-
|
744
|
+
|
745
|
+
<div id="method-M000029" class="method-detail">
|
746
|
+
<a name="M000029"></a>
|
598
747
|
|
599
748
|
<div class="method-heading">
|
600
|
-
|
749
|
+
|
750
|
+
<a href="#M000029" class="method-signature">
|
751
|
+
|
601
752
|
<span class="method-name">roll_minutes</span><span class="method-args">(minutes)</span>
|
753
|
+
|
602
754
|
</a>
|
755
|
+
|
603
756
|
</div>
|
604
|
-
|
757
|
+
|
605
758
|
<div class="method-description">
|
759
|
+
|
606
760
|
<p>
|
607
|
-
Return a
|
608
|
-
|
609
|
-
Positive numbers add <a href="SdlTimeSpan.html#M000068">minutes</a>.
|
610
|
-
Negative numbers remove <a href="SdlTimeSpan.html#M000068">minutes</a>.
|
761
|
+
Return a new instance with the minutes adjusted by the given amount.
|
762
|
+
Positive numbers add minutes. Negative numbers remove minutes.
|
611
763
|
</p>
|
612
764
|
<table>
|
613
|
-
<tr><td valign="top"><tt
|
614
|
-
subtract)
|
765
|
+
<tr><td valign="top"><tt>minutes</tt>:</td><td>The adjustment (minutes to add or subtract)
|
615
766
|
|
616
767
|
</td></tr>
|
617
768
|
</table>
|
769
|
+
|
618
770
|
<p><a class="source-toggle" href="#"
|
619
|
-
onclick="toggleCode('
|
620
|
-
<div class="method-source-code" id="
|
771
|
+
onclick="toggleCode('M000029-source');return false;">[Source]</a></p>
|
772
|
+
<div class="method-source-code" id="M000029-source">
|
621
773
|
<pre>
|
622
|
-
<span class="ruby-comment cmt"># File lib/sdl4r/sdl_time_span.rb, line
|
774
|
+
<span class="ruby-comment cmt"># File lib/sdl4r/sdl_time_span.rb, line 192</span>
|
623
775
|
<span class="ruby-keyword kw">def</span> <span class="ruby-identifier">roll_minutes</span>(<span class="ruby-identifier">minutes</span>)
|
624
776
|
<span class="ruby-constant">SdlTimeSpan</span>.<span class="ruby-identifier">new</span>(<span class="ruby-ivar">@totalMilliseconds</span> <span class="ruby-operator">+</span> (<span class="ruby-identifier">minutes</span> <span class="ruby-operator">*</span> <span class="ruby-constant">MILLISECONDS_IN_MINUTE</span>))
|
625
777
|
<span class="ruby-keyword kw">end</span>
|
626
778
|
</pre>
|
627
779
|
</div>
|
780
|
+
|
628
781
|
</div>
|
629
782
|
</div>
|
630
783
|
|
631
|
-
|
632
|
-
|
784
|
+
|
785
|
+
<div id="method-M000030" class="method-detail">
|
786
|
+
<a name="M000030"></a>
|
633
787
|
|
634
788
|
<div class="method-heading">
|
635
|
-
|
789
|
+
|
790
|
+
<a href="#M000030" class="method-signature">
|
791
|
+
|
636
792
|
<span class="method-name">roll_seconds</span><span class="method-args">(seconds)</span>
|
793
|
+
|
637
794
|
</a>
|
795
|
+
|
638
796
|
</div>
|
639
|
-
|
797
|
+
|
640
798
|
<div class="method-description">
|
799
|
+
|
641
800
|
<p>
|
642
|
-
Return a
|
643
|
-
|
644
|
-
Positive numbers add <a href="SdlTimeSpan.html#M000070">seconds</a>.
|
645
|
-
Negative numbers remove <a href="SdlTimeSpan.html#M000070">seconds</a>.
|
801
|
+
Return a new instance with the seconds adjusted by the given amount.
|
802
|
+
Positive numbers add seconds. Negative numbers remove seconds.
|
646
803
|
</p>
|
647
804
|
<table>
|
648
|
-
<tr><td valign="top"><tt
|
649
|
-
subtract)
|
805
|
+
<tr><td valign="top"><tt>seconds</tt>:</td><td>The adjustment (seconds to add or subtract)
|
650
806
|
|
651
807
|
</td></tr>
|
652
808
|
</table>
|
809
|
+
|
653
810
|
<p><a class="source-toggle" href="#"
|
654
|
-
onclick="toggleCode('
|
655
|
-
<div class="method-source-code" id="
|
811
|
+
onclick="toggleCode('M000030-source');return false;">[Source]</a></p>
|
812
|
+
<div class="method-source-code" id="M000030-source">
|
656
813
|
<pre>
|
657
|
-
<span class="ruby-comment cmt"># File lib/sdl4r/sdl_time_span.rb, line
|
814
|
+
<span class="ruby-comment cmt"># File lib/sdl4r/sdl_time_span.rb, line 201</span>
|
658
815
|
<span class="ruby-keyword kw">def</span> <span class="ruby-identifier">roll_seconds</span>(<span class="ruby-identifier">seconds</span>)
|
659
816
|
<span class="ruby-constant">SdlTimeSpan</span>.<span class="ruby-identifier">new</span>(<span class="ruby-ivar">@totalMilliseconds</span> <span class="ruby-operator">+</span> (<span class="ruby-identifier">seconds</span> <span class="ruby-operator">*</span> <span class="ruby-constant">MILLISECONDS_IN_SECOND</span>))
|
660
817
|
<span class="ruby-keyword kw">end</span>
|
661
818
|
</pre>
|
662
819
|
</div>
|
820
|
+
|
663
821
|
</div>
|
664
822
|
</div>
|
665
823
|
|
666
|
-
|
667
|
-
|
824
|
+
|
825
|
+
<div id="method-M000019" class="method-detail">
|
826
|
+
<a name="M000019"></a>
|
668
827
|
|
669
828
|
<div class="method-heading">
|
829
|
+
|
670
830
|
<span class="method-name">sec</span><span class="method-args">()</span>
|
831
|
+
|
671
832
|
</div>
|
672
|
-
|
833
|
+
|
673
834
|
<div class="method-description">
|
835
|
+
|
674
836
|
<p>
|
675
|
-
Alias for <a href="SdlTimeSpan.html#
|
837
|
+
Alias for <a href="SdlTimeSpan.html#M000018">seconds</a>
|
676
838
|
</p>
|
839
|
+
|
677
840
|
</div>
|
678
841
|
</div>
|
679
842
|
|
680
|
-
|
681
|
-
|
843
|
+
|
844
|
+
<div id="method-M000018" class="method-detail">
|
845
|
+
<a name="M000018"></a>
|
682
846
|
|
683
847
|
<div class="method-heading">
|
684
|
-
|
848
|
+
|
849
|
+
<a href="#M000018" class="method-signature">
|
850
|
+
|
685
851
|
<span class="method-name">seconds</span><span class="method-args">()</span>
|
852
|
+
|
686
853
|
</a>
|
854
|
+
|
687
855
|
</div>
|
688
|
-
|
856
|
+
|
689
857
|
<div class="method-description">
|
858
|
+
|
690
859
|
<p>
|
691
|
-
The
|
860
|
+
The seconds component.
|
692
861
|
</p>
|
862
|
+
|
693
863
|
<p><a class="source-toggle" href="#"
|
694
|
-
onclick="toggleCode('
|
695
|
-
<div class="method-source-code" id="
|
864
|
+
onclick="toggleCode('M000018-source');return false;">[Source]</a></p>
|
865
|
+
<div class="method-source-code" id="M000018-source">
|
696
866
|
<pre>
|
697
|
-
<span class="ruby-comment cmt"># File lib/sdl4r/sdl_time_span.rb, line
|
867
|
+
<span class="ruby-comment cmt"># File lib/sdl4r/sdl_time_span.rb, line 115</span>
|
698
868
|
<span class="ruby-keyword kw">def</span> <span class="ruby-identifier">seconds</span>
|
699
869
|
<span class="ruby-keyword kw">return</span> <span class="ruby-identifier">sign</span> <span class="ruby-operator">*</span>
|
700
870
|
((<span class="ruby-ivar">@totalMilliseconds</span> <span class="ruby-operator">-</span> (<span class="ruby-identifier">days</span> <span class="ruby-operator">*</span> <span class="ruby-constant">MILLISECONDS_IN_DAY</span>) <span class="ruby-operator">-</span> (<span class="ruby-identifier">hours</span> <span class="ruby-operator">*</span> <span class="ruby-constant">MILLISECONDS_IN_HOUR</span>) <span class="ruby-operator">-</span>
|
@@ -703,46 +873,61 @@ The <a href="SdlTimeSpan.html#M000070">seconds</a> component.
|
|
703
873
|
<span class="ruby-keyword kw">end</span>
|
704
874
|
</pre>
|
705
875
|
</div>
|
876
|
+
|
706
877
|
</div>
|
707
878
|
</div>
|
708
879
|
|
709
|
-
|
710
|
-
|
880
|
+
|
881
|
+
<div id="method-M000011" class="method-detail">
|
882
|
+
<a name="M000011"></a>
|
711
883
|
|
712
884
|
<div class="method-heading">
|
713
|
-
|
885
|
+
|
886
|
+
<a href="#M000011" class="method-signature">
|
887
|
+
|
714
888
|
<span class="method-name">sign</span><span class="method-args">()</span>
|
889
|
+
|
715
890
|
</a>
|
891
|
+
|
716
892
|
</div>
|
717
|
-
|
893
|
+
|
718
894
|
<div class="method-description">
|
895
|
+
|
719
896
|
<p>
|
720
|
-
Returns the
|
721
|
-
|
897
|
+
Returns the sign (-1 or +1) of this <a
|
898
|
+
href="SdlTimeSpan.html">SdlTimeSpan</a>.
|
722
899
|
</p>
|
900
|
+
|
723
901
|
<p><a class="source-toggle" href="#"
|
724
|
-
onclick="toggleCode('
|
725
|
-
<div class="method-source-code" id="
|
902
|
+
onclick="toggleCode('M000011-source');return false;">[Source]</a></p>
|
903
|
+
<div class="method-source-code" id="M000011-source">
|
726
904
|
<pre>
|
727
|
-
<span class="ruby-comment cmt"># File lib/sdl4r/sdl_time_span.rb, line
|
905
|
+
<span class="ruby-comment cmt"># File lib/sdl4r/sdl_time_span.rb, line 86</span>
|
728
906
|
<span class="ruby-keyword kw">def</span> <span class="ruby-identifier">sign</span>
|
729
907
|
<span class="ruby-ivar">@totalMilliseconds</span> <span class="ruby-operator"><=></span> <span class="ruby-value">0</span>
|
730
908
|
<span class="ruby-keyword kw">end</span>
|
731
909
|
</pre>
|
732
910
|
</div>
|
911
|
+
|
733
912
|
</div>
|
734
913
|
</div>
|
735
914
|
|
736
|
-
|
737
|
-
|
915
|
+
|
916
|
+
<div id="method-M000036" class="method-detail">
|
917
|
+
<a name="M000036"></a>
|
738
918
|
|
739
919
|
<div class="method-heading">
|
740
|
-
|
920
|
+
|
921
|
+
<a href="#M000036" class="method-signature">
|
922
|
+
|
741
923
|
<span class="method-name">to_s</span><span class="method-args">()</span>
|
924
|
+
|
742
925
|
</a>
|
926
|
+
|
743
927
|
</div>
|
744
|
-
|
928
|
+
|
745
929
|
<div class="method-description">
|
930
|
+
|
746
931
|
<p>
|
747
932
|
Returns an SDL representation of this time span using the format:
|
748
933
|
</p>
|
@@ -753,15 +938,11 @@ Returns an SDL representation of this time span using the format:
|
|
753
938
|
(parenthesis indicate optional components)
|
754
939
|
</p>
|
755
940
|
<p>
|
756
|
-
The
|
757
|
-
|
758
|
-
included if they are set to 0. Days must be suffixed with "d" for
|
759
|
-
clarity.
|
941
|
+
The days and milliseconds components will not be included if they are set
|
942
|
+
to 0. Days must be suffixed with “d” for clarity.
|
760
943
|
</p>
|
761
944
|
<p>
|
762
|
-
Hours,
|
763
|
-
href="SdlTimeSpan.html#M000070">seconds</a> will be zero paded to two
|
764
|
-
characters.
|
945
|
+
Hours, minutes, and seconds will be zero paded to two characters.
|
765
946
|
</p>
|
766
947
|
<p>
|
767
948
|
Examples:
|
@@ -771,11 +952,12 @@ Examples:
|
|
771
952
|
24d:12:13:09.234 (24 days, 12 hours, 13 minutes, 9 seconds,
|
772
953
|
234 milliseconds)
|
773
954
|
</pre>
|
955
|
+
|
774
956
|
<p><a class="source-toggle" href="#"
|
775
|
-
onclick="toggleCode('
|
776
|
-
<div class="method-source-code" id="
|
957
|
+
onclick="toggleCode('M000036-source');return false;">[Source]</a></p>
|
958
|
+
<div class="method-source-code" id="M000036-source">
|
777
959
|
<pre>
|
778
|
-
<span class="ruby-comment cmt"># File lib/sdl4r/sdl_time_span.rb, line
|
960
|
+
<span class="ruby-comment cmt"># File lib/sdl4r/sdl_time_span.rb, line 250</span>
|
779
961
|
<span class="ruby-keyword kw">def</span> <span class="ruby-identifier">to_s</span>
|
780
962
|
<span class="ruby-identifier">_days</span> = <span class="ruby-identifier">days</span>
|
781
963
|
<span class="ruby-identifier">_milliseconds</span> = <span class="ruby-identifier">milliseconds</span>
|
@@ -804,145 +986,181 @@ Examples:
|
|
804
986
|
<span class="ruby-keyword kw">end</span>
|
805
987
|
</pre>
|
806
988
|
</div>
|
989
|
+
|
807
990
|
</div>
|
808
991
|
</div>
|
809
992
|
|
810
|
-
|
811
|
-
|
993
|
+
|
994
|
+
<div id="method-M000022" class="method-detail">
|
995
|
+
<a name="M000022"></a>
|
812
996
|
|
813
997
|
<div class="method-heading">
|
814
|
-
|
998
|
+
|
999
|
+
<a href="#M000022" class="method-signature">
|
1000
|
+
|
815
1001
|
<span class="method-name">total_hours</span><span class="method-args">()</span>
|
1002
|
+
|
816
1003
|
</a>
|
1004
|
+
|
817
1005
|
</div>
|
818
|
-
|
1006
|
+
|
819
1007
|
<div class="method-description">
|
1008
|
+
|
820
1009
|
<p>
|
821
|
-
Get the total number of
|
822
|
-
|
823
|
-
href="SdlTimeSpan.html#M000064">days</a>, this method will return 48.
|
1010
|
+
Get the total number of hours in this time span. For example, if this time
|
1011
|
+
span represents two days, this method will return 48.
|
824
1012
|
</p>
|
1013
|
+
|
825
1014
|
<p><a class="source-toggle" href="#"
|
826
|
-
onclick="toggleCode('
|
827
|
-
<div class="method-source-code" id="
|
1015
|
+
onclick="toggleCode('M000022-source');return false;">[Source]</a></p>
|
1016
|
+
<div class="method-source-code" id="M000022-source">
|
828
1017
|
<pre>
|
829
|
-
<span class="ruby-comment cmt"># File lib/sdl4r/sdl_time_span.rb, line
|
1018
|
+
<span class="ruby-comment cmt"># File lib/sdl4r/sdl_time_span.rb, line 137</span>
|
830
1019
|
<span class="ruby-keyword kw">def</span> <span class="ruby-identifier">total_hours</span>
|
831
1020
|
<span class="ruby-keyword kw">return</span> <span class="ruby-identifier">sign</span> <span class="ruby-operator">*</span> (<span class="ruby-ivar">@totalMilliseconds</span>.<span class="ruby-identifier">abs</span> <span class="ruby-operator">/</span> <span class="ruby-constant">MILLISECONDS_IN_HOUR</span>)
|
832
1021
|
<span class="ruby-keyword kw">end</span>
|
833
1022
|
</pre>
|
834
1023
|
</div>
|
1024
|
+
|
835
1025
|
</div>
|
836
1026
|
</div>
|
837
1027
|
|
838
|
-
|
839
|
-
|
1028
|
+
|
1029
|
+
<div id="method-M000025" class="method-detail">
|
1030
|
+
<a name="M000025"></a>
|
840
1031
|
|
841
1032
|
<div class="method-heading">
|
842
|
-
|
1033
|
+
|
1034
|
+
<a href="#M000025" class="method-signature">
|
1035
|
+
|
843
1036
|
<span class="method-name">total_milliseconds</span><span class="method-args">()</span>
|
1037
|
+
|
844
1038
|
</a>
|
1039
|
+
|
845
1040
|
</div>
|
846
|
-
|
1041
|
+
|
847
1042
|
<div class="method-description">
|
1043
|
+
|
848
1044
|
<p>
|
849
|
-
Get the total number of
|
850
|
-
|
851
|
-
href="SdlTimeSpan.html#M000070">seconds</a>, this method will return 4000.
|
1045
|
+
Get the total number of milliseconds in this time span. For example, if
|
1046
|
+
this time span represents 4 seconds, this method will return 4000.
|
852
1047
|
</p>
|
1048
|
+
|
853
1049
|
<p><a class="source-toggle" href="#"
|
854
|
-
onclick="toggleCode('
|
855
|
-
<div class="method-source-code" id="
|
1050
|
+
onclick="toggleCode('M000025-source');return false;">[Source]</a></p>
|
1051
|
+
<div class="method-source-code" id="M000025-source">
|
856
1052
|
<pre>
|
857
|
-
<span class="ruby-comment cmt"># File lib/sdl4r/sdl_time_span.rb, line
|
1053
|
+
<span class="ruby-comment cmt"># File lib/sdl4r/sdl_time_span.rb, line 158</span>
|
858
1054
|
<span class="ruby-keyword kw">def</span> <span class="ruby-identifier">total_milliseconds</span>
|
859
1055
|
<span class="ruby-keyword kw">return</span> <span class="ruby-ivar">@totalMilliseconds</span>
|
860
1056
|
<span class="ruby-keyword kw">end</span>
|
861
1057
|
</pre>
|
862
1058
|
</div>
|
1059
|
+
|
863
1060
|
</div>
|
864
1061
|
</div>
|
865
1062
|
|
866
|
-
|
867
|
-
|
1063
|
+
|
1064
|
+
<div id="method-M000023" class="method-detail">
|
1065
|
+
<a name="M000023"></a>
|
868
1066
|
|
869
1067
|
<div class="method-heading">
|
870
|
-
|
1068
|
+
|
1069
|
+
<a href="#M000023" class="method-signature">
|
1070
|
+
|
871
1071
|
<span class="method-name">total_minutes</span><span class="method-args">()</span>
|
1072
|
+
|
872
1073
|
</a>
|
1074
|
+
|
873
1075
|
</div>
|
874
|
-
|
1076
|
+
|
875
1077
|
<div class="method-description">
|
1078
|
+
|
876
1079
|
<p>
|
877
|
-
Get the total number of
|
878
|
-
|
879
|
-
href="SdlTimeSpan.html#M000066">hours</a>, this method will return 120.
|
1080
|
+
Get the total number of minutes in this time span. For example, if this
|
1081
|
+
time span represents two hours, this method will return 120.
|
880
1082
|
</p>
|
1083
|
+
|
881
1084
|
<p><a class="source-toggle" href="#"
|
882
|
-
onclick="toggleCode('
|
883
|
-
<div class="method-source-code" id="
|
1085
|
+
onclick="toggleCode('M000023-source');return false;">[Source]</a></p>
|
1086
|
+
<div class="method-source-code" id="M000023-source">
|
884
1087
|
<pre>
|
885
|
-
<span class="ruby-comment cmt"># File lib/sdl4r/sdl_time_span.rb, line
|
1088
|
+
<span class="ruby-comment cmt"># File lib/sdl4r/sdl_time_span.rb, line 144</span>
|
886
1089
|
<span class="ruby-keyword kw">def</span> <span class="ruby-identifier">total_minutes</span>
|
887
1090
|
<span class="ruby-keyword kw">return</span> <span class="ruby-identifier">sign</span> <span class="ruby-operator">*</span> (<span class="ruby-ivar">@totalMilliseconds</span>.<span class="ruby-identifier">abs</span> <span class="ruby-operator">/</span> <span class="ruby-constant">MILLISECONDS_IN_MINUTE</span>)
|
888
1091
|
<span class="ruby-keyword kw">end</span>
|
889
1092
|
</pre>
|
890
1093
|
</div>
|
1094
|
+
|
891
1095
|
</div>
|
892
1096
|
</div>
|
893
1097
|
|
894
|
-
|
895
|
-
|
1098
|
+
|
1099
|
+
<div id="method-M000024" class="method-detail">
|
1100
|
+
<a name="M000024"></a>
|
896
1101
|
|
897
1102
|
<div class="method-heading">
|
898
|
-
|
1103
|
+
|
1104
|
+
<a href="#M000024" class="method-signature">
|
1105
|
+
|
899
1106
|
<span class="method-name">total_seconds</span><span class="method-args">()</span>
|
1107
|
+
|
900
1108
|
</a>
|
1109
|
+
|
901
1110
|
</div>
|
902
|
-
|
1111
|
+
|
903
1112
|
<div class="method-description">
|
1113
|
+
|
904
1114
|
<p>
|
905
|
-
Get the total number of
|
906
|
-
|
907
|
-
href="SdlTimeSpan.html#M000068">minutes</a>, this method will return 180.
|
1115
|
+
Get the total number of seconds in this time span. For example, if this
|
1116
|
+
time span represents three minutes, this method will return 180.
|
908
1117
|
</p>
|
1118
|
+
|
909
1119
|
<p><a class="source-toggle" href="#"
|
910
|
-
onclick="toggleCode('
|
911
|
-
<div class="method-source-code" id="
|
1120
|
+
onclick="toggleCode('M000024-source');return false;">[Source]</a></p>
|
1121
|
+
<div class="method-source-code" id="M000024-source">
|
912
1122
|
<pre>
|
913
|
-
<span class="ruby-comment cmt"># File lib/sdl4r/sdl_time_span.rb, line
|
1123
|
+
<span class="ruby-comment cmt"># File lib/sdl4r/sdl_time_span.rb, line 151</span>
|
914
1124
|
<span class="ruby-keyword kw">def</span> <span class="ruby-identifier">total_seconds</span>
|
915
1125
|
<span class="ruby-keyword kw">return</span> <span class="ruby-identifier">sign</span> <span class="ruby-operator">*</span> (<span class="ruby-ivar">@totalMilliseconds</span>.<span class="ruby-identifier">abs</span> <span class="ruby-operator">/</span> <span class="ruby-constant">MILLISECONDS_IN_SECOND</span>)
|
916
1126
|
<span class="ruby-keyword kw">end</span>
|
917
1127
|
</pre>
|
918
1128
|
</div>
|
1129
|
+
|
919
1130
|
</div>
|
920
1131
|
</div>
|
921
1132
|
|
922
|
-
|
923
|
-
|
1133
|
+
|
1134
|
+
<div id="method-M000021" class="method-detail">
|
1135
|
+
<a name="M000021"></a>
|
924
1136
|
|
925
1137
|
<div class="method-heading">
|
1138
|
+
|
926
1139
|
<span class="method-name">usec</span><span class="method-args">()</span>
|
1140
|
+
|
927
1141
|
</div>
|
928
|
-
|
1142
|
+
|
929
1143
|
<div class="method-description">
|
1144
|
+
|
930
1145
|
<p>
|
931
|
-
Alias for <a href="SdlTimeSpan.html#
|
1146
|
+
Alias for <a href="SdlTimeSpan.html#M000020">milliseconds</a>
|
932
1147
|
</p>
|
1148
|
+
|
933
1149
|
</div>
|
934
1150
|
</div>
|
935
1151
|
|
936
1152
|
|
1153
|
+
|
937
1154
|
</div>
|
938
1155
|
|
939
1156
|
|
940
|
-
</div>
|
941
1157
|
|
942
1158
|
|
1159
|
+
</div>
|
1160
|
+
|
943
1161
|
<div id="validator-badges">
|
944
1162
|
<p><small><a href="http://validator.w3.org/check/referer">[Validate]</a></small></p>
|
945
1163
|
</div>
|
946
1164
|
|
947
1165
|
</body>
|
948
|
-
</html>
|
1166
|
+
</html>
|