zyps 0.2.1 → 0.3.1
Sign up to get free protection for your applications and to get access to all the features.
- data/README.txt +0 -14
- data/bin/zyps +240 -28
- data/bin/zyps_demo +18 -2
- data/doc/classes/Behavior.html +205 -0
- data/doc/classes/Behavior.src/M000003.html +18 -0
- data/doc/classes/Behavior.src/M000004.html +19 -0
- data/doc/classes/Clock.html +165 -0
- data/doc/classes/Clock.src/M000026.html +18 -0
- data/doc/classes/Clock.src/M000027.html +21 -0
- data/doc/classes/Color.html +299 -0
- data/doc/classes/Color.src/M000015.html +18 -0
- data/doc/classes/Color.src/M000016.html +16 -0
- data/doc/classes/Color.src/M000017.html +16 -0
- data/doc/classes/Color.src/M000018.html +16 -0
- data/doc/classes/Color.src/M000019.html +18 -0
- data/doc/classes/Color.src/M000020.html +22 -0
- data/doc/classes/Creature.html +176 -0
- data/doc/classes/Creature.src/M000005.html +19 -0
- data/doc/classes/Environment.html +203 -0
- data/doc/classes/Environment.src/M000028.html +19 -0
- data/doc/classes/Environment.src/M000029.html +45 -0
- data/doc/classes/EnvironmentalFactor.html +167 -0
- data/doc/classes/EnvironmentalFactor.src/M000021.html +18 -0
- data/doc/classes/GameObject.html +256 -0
- data/doc/classes/GameObject.src/M000022.html +20 -0
- data/doc/classes/GameObject.src/M000023.html +19 -0
- data/doc/classes/GameObject.src/M000024.html +16 -0
- data/doc/classes/GameObject.src/M000025.html +16 -0
- data/doc/classes/Location.html +167 -0
- data/doc/classes/Location.src/M000014.html +18 -0
- data/doc/classes/Responsive.html +143 -0
- data/doc/classes/Responsive.src/M000030.html +18 -0
- data/doc/classes/TrailsView.html +217 -0
- data/doc/classes/TrailsView.src/M000001.html +40 -0
- data/doc/classes/TrailsView.src/M000002.html +76 -0
- data/doc/classes/Utility.html +264 -0
- data/doc/classes/Utility.src/M000031.html +26 -0
- data/doc/classes/Utility.src/M000032.html +22 -0
- data/doc/classes/Utility.src/M000033.html +18 -0
- data/doc/classes/Utility.src/M000034.html +21 -0
- data/doc/classes/Utility.src/M000035.html +25 -0
- data/doc/classes/Utility.src/M000036.html +21 -0
- data/doc/classes/Utility.src/M000037.html +22 -0
- data/doc/classes/Vector.html +281 -0
- data/doc/classes/Vector.src/M000006.html +19 -0
- data/doc/classes/Vector.src/M000007.html +16 -0
- data/doc/classes/Vector.src/M000008.html +21 -0
- data/doc/classes/Vector.src/M000009.html +16 -0
- data/doc/classes/Vector.src/M000010.html +18 -0
- data/doc/classes/Vector.src/M000011.html +16 -0
- data/doc/classes/Vector.src/M000012.html +18 -0
- data/doc/classes/Vector.src/M000013.html +25 -0
- data/doc/created.rid +1 -0
- data/doc/files/COPYING_LESSER_txt.html +311 -0
- data/doc/files/COPYING_txt.html +1003 -0
- data/doc/files/README_txt.html +214 -0
- data/doc/files/lib/zyps/views/trails_rb.html +134 -0
- data/doc/files/lib/zyps_rb.html +134 -0
- data/doc/fr_class_index.html +38 -0
- data/doc/fr_file_index.html +31 -0
- data/doc/fr_method_index.html +63 -0
- data/doc/index.html +24 -0
- data/doc/rdoc-style.css +208 -0
- data/lib/zyps/views/trails.rb +3 -3
- metadata +81 -6
- data/bin/zyps_server +0 -178
@@ -0,0 +1,165 @@
|
|
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: Clock</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">Clock</td>
|
54
|
+
</tr>
|
55
|
+
<tr class="top-aligned-row">
|
56
|
+
<td><strong>In:</strong></td>
|
57
|
+
<td>
|
58
|
+
<a href="../files/lib/zyps_rb.html">
|
59
|
+
lib/zyps.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
|
+
Object
|
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 clock to use for timing actions.
|
84
|
+
</p>
|
85
|
+
|
86
|
+
</div>
|
87
|
+
|
88
|
+
|
89
|
+
</div>
|
90
|
+
|
91
|
+
<div id="method-list">
|
92
|
+
<h3 class="section-bar">Methods</h3>
|
93
|
+
|
94
|
+
<div class="name-list">
|
95
|
+
<a href="#M000027">elapsed_time</a>
|
96
|
+
<a href="#M000026">new</a>
|
97
|
+
</div>
|
98
|
+
</div>
|
99
|
+
|
100
|
+
</div>
|
101
|
+
|
102
|
+
|
103
|
+
<!-- if includes -->
|
104
|
+
|
105
|
+
<div id="section">
|
106
|
+
|
107
|
+
|
108
|
+
|
109
|
+
|
110
|
+
|
111
|
+
|
112
|
+
|
113
|
+
|
114
|
+
<!-- if method_list -->
|
115
|
+
<div id="methods">
|
116
|
+
<h3 class="section-bar">Public Class methods</h3>
|
117
|
+
|
118
|
+
<div id="method-M000026" class="method-detail">
|
119
|
+
<a name="M000026"></a>
|
120
|
+
|
121
|
+
<div class="method-heading">
|
122
|
+
<a href="Clock.src/M000026.html" target="Code" class="method-signature"
|
123
|
+
onclick="popupCode('Clock.src/M000026.html');return false;">
|
124
|
+
<span class="method-name">new</span><span class="method-args">()</span>
|
125
|
+
</a>
|
126
|
+
</div>
|
127
|
+
|
128
|
+
<div class="method-description">
|
129
|
+
</div>
|
130
|
+
</div>
|
131
|
+
|
132
|
+
<h3 class="section-bar">Public Instance methods</h3>
|
133
|
+
|
134
|
+
<div id="method-M000027" class="method-detail">
|
135
|
+
<a name="M000027"></a>
|
136
|
+
|
137
|
+
<div class="method-heading">
|
138
|
+
<a href="Clock.src/M000027.html" target="Code" class="method-signature"
|
139
|
+
onclick="popupCode('Clock.src/M000027.html');return false;">
|
140
|
+
<span class="method-name">elapsed_time</span><span class="method-args">()</span>
|
141
|
+
</a>
|
142
|
+
</div>
|
143
|
+
|
144
|
+
<div class="method-description">
|
145
|
+
<p>
|
146
|
+
Returns the time in (fractional) seconds since this method was last called
|
147
|
+
(or on the first call, time since the <a href="Clock.html">Clock</a> was
|
148
|
+
created).
|
149
|
+
</p>
|
150
|
+
</div>
|
151
|
+
</div>
|
152
|
+
|
153
|
+
|
154
|
+
</div>
|
155
|
+
|
156
|
+
|
157
|
+
</div>
|
158
|
+
|
159
|
+
|
160
|
+
<div id="validator-badges">
|
161
|
+
<p><small><a href="http://validator.w3.org/check/referer">[Validate]</a></small></p>
|
162
|
+
</div>
|
163
|
+
|
164
|
+
</body>
|
165
|
+
</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>new (Clock)</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/zyps.rb, line 294</span>
|
14
|
+
<span class="ruby-keyword kw">def</span> <span class="ruby-identifier">initialize</span>
|
15
|
+
<span class="ruby-ivar">@last_check_time</span> = <span class="ruby-constant">Time</span>.<span class="ruby-identifier">new</span>.<span class="ruby-identifier">to_f</span>
|
16
|
+
<span class="ruby-keyword kw">end</span></pre>
|
17
|
+
</body>
|
18
|
+
</html>
|
@@ -0,0 +1,21 @@
|
|
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>elapsed_time (Clock)</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/zyps.rb, line 299</span>
|
14
|
+
<span class="ruby-keyword kw">def</span> <span class="ruby-identifier">elapsed_time</span>
|
15
|
+
<span class="ruby-identifier">time</span> = <span class="ruby-constant">Time</span>.<span class="ruby-identifier">new</span>.<span class="ruby-identifier">to_f</span>
|
16
|
+
<span class="ruby-identifier">elapsed_time</span> = <span class="ruby-identifier">time</span> <span class="ruby-operator">-</span> <span class="ruby-ivar">@last_check_time</span>
|
17
|
+
<span class="ruby-ivar">@last_check_time</span> = <span class="ruby-identifier">time</span>
|
18
|
+
<span class="ruby-identifier">elapsed_time</span>
|
19
|
+
<span class="ruby-keyword kw">end</span></pre>
|
20
|
+
</body>
|
21
|
+
</html>
|
@@ -0,0 +1,299 @@
|
|
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: Color</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">Color</td>
|
54
|
+
</tr>
|
55
|
+
<tr class="top-aligned-row">
|
56
|
+
<td><strong>In:</strong></td>
|
57
|
+
<td>
|
58
|
+
<a href="../files/lib/zyps_rb.html">
|
59
|
+
lib/zyps.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
|
+
Object
|
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
|
+
An object‘s color. Has red, green, and blue components, each ranging
|
84
|
+
from 0 to 1.
|
85
|
+
</p>
|
86
|
+
<ul>
|
87
|
+
<li>Red: <tt><a href="Color.html#M000015">Color.new</a>(1, 0, 0)</tt>
|
88
|
+
|
89
|
+
</li>
|
90
|
+
<li>Green: <tt><a href="Color.html#M000015">Color.new</a>(0, 1, 0)</tt>
|
91
|
+
|
92
|
+
</li>
|
93
|
+
<li>Blue: <tt><a href="Color.html#M000015">Color.new</a>(0, 0, 1)</tt>
|
94
|
+
|
95
|
+
</li>
|
96
|
+
<li>White: <tt><a href="Color.html#M000015">Color.new</a>(1, 1, 1)</tt>
|
97
|
+
|
98
|
+
</li>
|
99
|
+
<li>Black: <tt><a href="Color.html#M000015">Color.new</a>(0, 0, 0)</tt>
|
100
|
+
|
101
|
+
</li>
|
102
|
+
</ul>
|
103
|
+
|
104
|
+
</div>
|
105
|
+
|
106
|
+
|
107
|
+
</div>
|
108
|
+
|
109
|
+
<div id="method-list">
|
110
|
+
<h3 class="section-bar">Methods</h3>
|
111
|
+
|
112
|
+
<div class="name-list">
|
113
|
+
<a href="#M000020">+</a>
|
114
|
+
<a href="#M000019"><=></a>
|
115
|
+
<a href="#M000018">blue=</a>
|
116
|
+
<a href="#M000017">green=</a>
|
117
|
+
<a href="#M000015">new</a>
|
118
|
+
<a href="#M000016">red=</a>
|
119
|
+
</div>
|
120
|
+
</div>
|
121
|
+
|
122
|
+
</div>
|
123
|
+
|
124
|
+
|
125
|
+
<!-- if includes -->
|
126
|
+
<div id="includes">
|
127
|
+
<h3 class="section-bar">Included Modules</h3>
|
128
|
+
|
129
|
+
<div id="includes-list">
|
130
|
+
<span class="include-name">Comparable</span>
|
131
|
+
</div>
|
132
|
+
</div>
|
133
|
+
|
134
|
+
<div id="section">
|
135
|
+
|
136
|
+
|
137
|
+
|
138
|
+
|
139
|
+
|
140
|
+
<div id="attribute-list">
|
141
|
+
<h3 class="section-bar">Attributes</h3>
|
142
|
+
|
143
|
+
<div class="name-list">
|
144
|
+
<table>
|
145
|
+
<tr class="top-aligned-row context-row">
|
146
|
+
<td class="context-item-name">blue</td>
|
147
|
+
<td class="context-item-value"> [RW] </td>
|
148
|
+
<td class="context-item-desc">
|
149
|
+
Components which range from 0 to 1, which combine to form the <a
|
150
|
+
href="Color.html">Color</a>.
|
151
|
+
|
152
|
+
</td>
|
153
|
+
</tr>
|
154
|
+
<tr class="top-aligned-row context-row">
|
155
|
+
<td class="context-item-name">green</td>
|
156
|
+
<td class="context-item-value"> [RW] </td>
|
157
|
+
<td class="context-item-desc">
|
158
|
+
Components which range from 0 to 1, which combine to form the <a
|
159
|
+
href="Color.html">Color</a>.
|
160
|
+
|
161
|
+
</td>
|
162
|
+
</tr>
|
163
|
+
<tr class="top-aligned-row context-row">
|
164
|
+
<td class="context-item-name">red</td>
|
165
|
+
<td class="context-item-value"> [RW] </td>
|
166
|
+
<td class="context-item-desc">
|
167
|
+
Components which range from 0 to 1, which combine to form the <a
|
168
|
+
href="Color.html">Color</a>.
|
169
|
+
|
170
|
+
</td>
|
171
|
+
</tr>
|
172
|
+
</table>
|
173
|
+
</div>
|
174
|
+
</div>
|
175
|
+
|
176
|
+
|
177
|
+
|
178
|
+
<!-- if method_list -->
|
179
|
+
<div id="methods">
|
180
|
+
<h3 class="section-bar">Public Class methods</h3>
|
181
|
+
|
182
|
+
<div id="method-M000015" class="method-detail">
|
183
|
+
<a name="M000015"></a>
|
184
|
+
|
185
|
+
<div class="method-heading">
|
186
|
+
<a href="Color.src/M000015.html" target="Code" class="method-signature"
|
187
|
+
onclick="popupCode('Color.src/M000015.html');return false;">
|
188
|
+
<span class="method-name">new</span><span class="method-args">(red = 1, green = 1, blue = 1)</span>
|
189
|
+
</a>
|
190
|
+
</div>
|
191
|
+
|
192
|
+
<div class="method-description">
|
193
|
+
</div>
|
194
|
+
</div>
|
195
|
+
|
196
|
+
<h3 class="section-bar">Public Instance methods</h3>
|
197
|
+
|
198
|
+
<div id="method-M000020" class="method-detail">
|
199
|
+
<a name="M000020"></a>
|
200
|
+
|
201
|
+
<div class="method-heading">
|
202
|
+
<a href="Color.src/M000020.html" target="Code" class="method-signature"
|
203
|
+
onclick="popupCode('Color.src/M000020.html');return false;">
|
204
|
+
<span class="method-name">+</span><span class="method-args">(color2)</span>
|
205
|
+
</a>
|
206
|
+
</div>
|
207
|
+
|
208
|
+
<div class="method-description">
|
209
|
+
<p>
|
210
|
+
Averages each component of this <a href="Color.html">Color</a> with the
|
211
|
+
corresponding component of color2, returning a <a
|
212
|
+
href="Color.html#M000015">new</a> <a href="Color.html">Color</a>.
|
213
|
+
</p>
|
214
|
+
</div>
|
215
|
+
</div>
|
216
|
+
|
217
|
+
<div id="method-M000019" class="method-detail">
|
218
|
+
<a name="M000019"></a>
|
219
|
+
|
220
|
+
<div class="method-heading">
|
221
|
+
<a href="Color.src/M000019.html" target="Code" class="method-signature"
|
222
|
+
onclick="popupCode('Color.src/M000019.html');return false;">
|
223
|
+
<span class="method-name"><=></span><span class="method-args">(other)</span>
|
224
|
+
</a>
|
225
|
+
</div>
|
226
|
+
|
227
|
+
<div class="method-description">
|
228
|
+
<p>
|
229
|
+
Compares this <a href="Color.html">Color</a> with another to see which is
|
230
|
+
brighter. The sum of all components (red + green + blue) for each color
|
231
|
+
determines which is greater.
|
232
|
+
</p>
|
233
|
+
</div>
|
234
|
+
</div>
|
235
|
+
|
236
|
+
<div id="method-M000018" class="method-detail">
|
237
|
+
<a name="M000018"></a>
|
238
|
+
|
239
|
+
<div class="method-heading">
|
240
|
+
<a href="Color.src/M000018.html" target="Code" class="method-signature"
|
241
|
+
onclick="popupCode('Color.src/M000018.html');return false;">
|
242
|
+
<span class="method-name">blue=</span><span class="method-args">(v)</span>
|
243
|
+
</a>
|
244
|
+
</div>
|
245
|
+
|
246
|
+
<div class="method-description">
|
247
|
+
<p>
|
248
|
+
Automatically constrains value to the range 0 - 1.
|
249
|
+
</p>
|
250
|
+
</div>
|
251
|
+
</div>
|
252
|
+
|
253
|
+
<div id="method-M000017" class="method-detail">
|
254
|
+
<a name="M000017"></a>
|
255
|
+
|
256
|
+
<div class="method-heading">
|
257
|
+
<a href="Color.src/M000017.html" target="Code" class="method-signature"
|
258
|
+
onclick="popupCode('Color.src/M000017.html');return false;">
|
259
|
+
<span class="method-name">green=</span><span class="method-args">(v)</span>
|
260
|
+
</a>
|
261
|
+
</div>
|
262
|
+
|
263
|
+
<div class="method-description">
|
264
|
+
<p>
|
265
|
+
Automatically constrains value to the range 0 - 1.
|
266
|
+
</p>
|
267
|
+
</div>
|
268
|
+
</div>
|
269
|
+
|
270
|
+
<div id="method-M000016" class="method-detail">
|
271
|
+
<a name="M000016"></a>
|
272
|
+
|
273
|
+
<div class="method-heading">
|
274
|
+
<a href="Color.src/M000016.html" target="Code" class="method-signature"
|
275
|
+
onclick="popupCode('Color.src/M000016.html');return false;">
|
276
|
+
<span class="method-name">red=</span><span class="method-args">(v)</span>
|
277
|
+
</a>
|
278
|
+
</div>
|
279
|
+
|
280
|
+
<div class="method-description">
|
281
|
+
<p>
|
282
|
+
Automatically constrains value to the range 0 - 1.
|
283
|
+
</p>
|
284
|
+
</div>
|
285
|
+
</div>
|
286
|
+
|
287
|
+
|
288
|
+
</div>
|
289
|
+
|
290
|
+
|
291
|
+
</div>
|
292
|
+
|
293
|
+
|
294
|
+
<div id="validator-badges">
|
295
|
+
<p><small><a href="http://validator.w3.org/check/referer">[Validate]</a></small></p>
|
296
|
+
</div>
|
297
|
+
|
298
|
+
</body>
|
299
|
+
</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>new (Color)</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/zyps.rb, line 198</span>
|
14
|
+
<span class="ruby-keyword kw">def</span> <span class="ruby-identifier">initialize</span> (<span class="ruby-identifier">red</span> = <span class="ruby-value">1</span>, <span class="ruby-identifier">green</span> = <span class="ruby-value">1</span>, <span class="ruby-identifier">blue</span> = <span class="ruby-value">1</span>)
|
15
|
+
<span class="ruby-keyword kw">self</span>.<span class="ruby-identifier">red</span>, <span class="ruby-keyword kw">self</span>.<span class="ruby-identifier">green</span>, <span class="ruby-keyword kw">self</span>.<span class="ruby-identifier">blue</span> = <span class="ruby-identifier">red</span>, <span class="ruby-identifier">green</span>, <span class="ruby-identifier">blue</span>
|
16
|
+
<span class="ruby-keyword kw">end</span></pre>
|
17
|
+
</body>
|
18
|
+
</html>
|
@@ -0,0 +1,16 @@
|
|
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>red= (Color)</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/zyps.rb, line 203</span>
|
14
|
+
<span class="ruby-keyword kw">def</span> <span class="ruby-identifier">red=</span>(<span class="ruby-identifier">v</span>); <span class="ruby-identifier">v</span> = <span class="ruby-value">0</span> <span class="ruby-keyword kw">if</span> <span class="ruby-identifier">v</span> <span class="ruby-operator"><</span> <span class="ruby-value">0</span>; <span class="ruby-identifier">v</span> = <span class="ruby-value">1</span> <span class="ruby-keyword kw">if</span> <span class="ruby-identifier">v</span> <span class="ruby-operator">></span> <span class="ruby-value">1</span>; <span class="ruby-ivar">@red</span> = <span class="ruby-identifier">v</span>; <span class="ruby-keyword kw">end</span></pre>
|
15
|
+
</body>
|
16
|
+
</html>
|
@@ -0,0 +1,16 @@
|
|
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>green= (Color)</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/zyps.rb, line 205</span>
|
14
|
+
<span class="ruby-keyword kw">def</span> <span class="ruby-identifier">green=</span>(<span class="ruby-identifier">v</span>); <span class="ruby-identifier">v</span> = <span class="ruby-value">0</span> <span class="ruby-keyword kw">if</span> <span class="ruby-identifier">v</span> <span class="ruby-operator"><</span> <span class="ruby-value">0</span>; <span class="ruby-identifier">v</span> = <span class="ruby-value">1</span> <span class="ruby-keyword kw">if</span> <span class="ruby-identifier">v</span> <span class="ruby-operator">></span> <span class="ruby-value">1</span>; <span class="ruby-ivar">@green</span> = <span class="ruby-identifier">v</span>; <span class="ruby-keyword kw">end</span></pre>
|
15
|
+
</body>
|
16
|
+
</html>
|
@@ -0,0 +1,16 @@
|
|
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>blue= (Color)</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/zyps.rb, line 207</span>
|
14
|
+
<span class="ruby-keyword kw">def</span> <span class="ruby-identifier">blue=</span>(<span class="ruby-identifier">v</span>); <span class="ruby-identifier">v</span> = <span class="ruby-value">0</span> <span class="ruby-keyword kw">if</span> <span class="ruby-identifier">v</span> <span class="ruby-operator"><</span> <span class="ruby-value">0</span>; <span class="ruby-identifier">v</span> = <span class="ruby-value">1</span> <span class="ruby-keyword kw">if</span> <span class="ruby-identifier">v</span> <span class="ruby-operator">></span> <span class="ruby-value">1</span>; <span class="ruby-ivar">@blue</span> = <span class="ruby-identifier">v</span>; <span class="ruby-keyword kw">end</span></pre>
|
15
|
+
</body>
|
16
|
+
</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><=> (Color)</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/zyps.rb, line 211</span>
|
14
|
+
<span class="ruby-keyword kw">def</span> <span class="ruby-operator"><=></span>(<span class="ruby-identifier">other</span>)
|
15
|
+
<span class="ruby-ivar">@red</span> <span class="ruby-operator">+</span> <span class="ruby-ivar">@green</span> <span class="ruby-operator">+</span> <span class="ruby-ivar">@blue</span> <span class="ruby-operator"><=></span> <span class="ruby-identifier">other</span>.<span class="ruby-identifier">red</span> <span class="ruby-operator">+</span> <span class="ruby-identifier">other</span>.<span class="ruby-identifier">green</span> <span class="ruby-operator">+</span> <span class="ruby-identifier">other</span>.<span class="ruby-identifier">blue</span>
|
16
|
+
<span class="ruby-keyword kw">end</span></pre>
|
17
|
+
</body>
|
18
|
+
</html>
|
@@ -0,0 +1,22 @@
|
|
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>+ (Color)</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/zyps.rb, line 216</span>
|
14
|
+
<span class="ruby-keyword kw">def</span> <span class="ruby-operator">+</span>(<span class="ruby-identifier">color2</span>)
|
15
|
+
<span class="ruby-constant">Color</span>.<span class="ruby-identifier">new</span>(
|
16
|
+
<span class="ruby-keyword kw">self</span>.<span class="ruby-identifier">red</span> <span class="ruby-operator">+</span> <span class="ruby-identifier">color2</span>.<span class="ruby-identifier">red</span> <span class="ruby-operator">/</span> <span class="ruby-value">2.0</span>,
|
17
|
+
<span class="ruby-keyword kw">self</span>.<span class="ruby-identifier">green</span> <span class="ruby-operator">+</span> <span class="ruby-identifier">color2</span>.<span class="ruby-identifier">green</span> <span class="ruby-operator">/</span> <span class="ruby-value">2.0</span>,
|
18
|
+
<span class="ruby-keyword kw">self</span>.<span class="ruby-identifier">blue</span> <span class="ruby-operator">+</span> <span class="ruby-identifier">color2</span>.<span class="ruby-identifier">blue</span> <span class="ruby-operator">/</span> <span class="ruby-value">2.0</span>
|
19
|
+
)
|
20
|
+
<span class="ruby-keyword kw">end</span></pre>
|
21
|
+
</body>
|
22
|
+
</html>
|