rubycube 0.2.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +7 -0
- data/CHANGES +30 -0
- data/MANIFEST +12 -0
- data/README.md +69 -0
- data/Rakefile +50 -0
- data/certs/djberg96_pub.pem +21 -0
- data/cube.gemspec +23 -0
- data/doc/Bar.html +102 -0
- data/doc/CHANGES.html +159 -0
- data/doc/Foo.html +184 -0
- data/doc/Interface.html +278 -0
- data/doc/Interface/MethodMissing.html +104 -0
- data/doc/Interface/PrivateVisibleMethodMissing.html +102 -0
- data/doc/Interface/PublicVisibleMethodMissing.html +102 -0
- data/doc/MANIFEST.html +114 -0
- data/doc/Module.html +153 -0
- data/doc/MyClass.html +234 -0
- data/doc/MyInterface.html +106 -0
- data/doc/MySubInterface.html +110 -0
- data/doc/Object.html +299 -0
- data/doc/README.html +222 -0
- data/doc/Rakefile.html +148 -0
- data/doc/TC_Interface.html +438 -0
- data/doc/certs/djberg96_pub_pem.html +110 -0
- data/doc/created.rid +13 -0
- data/doc/css/fonts.css +167 -0
- data/doc/css/rdoc.css +590 -0
- data/doc/fonts/Lato-Light.ttf +0 -0
- data/doc/fonts/Lato-LightItalic.ttf +0 -0
- data/doc/fonts/Lato-Regular.ttf +0 -0
- data/doc/fonts/Lato-RegularItalic.ttf +0 -0
- data/doc/fonts/SourceCodePro-Bold.ttf +0 -0
- data/doc/fonts/SourceCodePro-Regular.ttf +0 -0
- data/doc/images/add.png +0 -0
- data/doc/images/arrow_up.png +0 -0
- data/doc/images/brick.png +0 -0
- data/doc/images/brick_link.png +0 -0
- data/doc/images/bug.png +0 -0
- data/doc/images/bullet_black.png +0 -0
- data/doc/images/bullet_toggle_minus.png +0 -0
- data/doc/images/bullet_toggle_plus.png +0 -0
- data/doc/images/date.png +0 -0
- data/doc/images/delete.png +0 -0
- data/doc/images/find.png +0 -0
- data/doc/images/loadingAnimation.gif +0 -0
- data/doc/images/macFFBgHack.png +0 -0
- data/doc/images/package.png +0 -0
- data/doc/images/page_green.png +0 -0
- data/doc/images/page_white_text.png +0 -0
- data/doc/images/page_white_width.png +0 -0
- data/doc/images/plugin.png +0 -0
- data/doc/images/ruby.png +0 -0
- data/doc/images/tag_blue.png +0 -0
- data/doc/images/tag_green.png +0 -0
- data/doc/images/transparent.png +0 -0
- data/doc/images/wrench.png +0 -0
- data/doc/images/wrench_orange.png +0 -0
- data/doc/images/zoom.png +0 -0
- data/doc/index.html +121 -0
- data/doc/interface_gemspec.html +121 -0
- data/doc/js/darkfish.js +161 -0
- data/doc/js/jquery.js +4 -0
- data/doc/js/navigation.js +142 -0
- data/doc/js/navigation.js.gz +0 -0
- data/doc/js/search.js +109 -0
- data/doc/js/search_index.js +1 -0
- data/doc/js/search_index.js.gz +0 -0
- data/doc/js/searcher.js +228 -0
- data/doc/js/searcher.js.gz +0 -0
- data/doc/table_of_contents.html +227 -0
- data/examples/demo.rb +96 -0
- data/lib/cube.rb +2 -0
- data/lib/cube/interfaces.rb +266 -0
- data/lib/cube/traits.rb +75 -0
- data/test/test_interface.rb +111 -0
- metadata +151 -0
data/doc/Foo.html
ADDED
@@ -0,0 +1,184 @@
|
|
1
|
+
<!DOCTYPE html>
|
2
|
+
|
3
|
+
<html>
|
4
|
+
<head>
|
5
|
+
<meta charset="UTF-8">
|
6
|
+
|
7
|
+
<title>class Foo - RDoc Documentation</title>
|
8
|
+
|
9
|
+
<script type="text/javascript">
|
10
|
+
var rdoc_rel_prefix = "./";
|
11
|
+
</script>
|
12
|
+
|
13
|
+
<script src="./js/jquery.js"></script>
|
14
|
+
<script src="./js/darkfish.js"></script>
|
15
|
+
|
16
|
+
<link href="./css/fonts.css" rel="stylesheet">
|
17
|
+
<link href="./css/rdoc.css" rel="stylesheet">
|
18
|
+
|
19
|
+
|
20
|
+
|
21
|
+
<body id="top" role="document" class="class">
|
22
|
+
<nav role="navigation">
|
23
|
+
<div id="project-navigation">
|
24
|
+
<div id="home-section" role="region" title="Quick navigation" class="nav-section">
|
25
|
+
<h2>
|
26
|
+
<a href="./index.html" rel="home">Home</a>
|
27
|
+
</h2>
|
28
|
+
|
29
|
+
<div id="table-of-contents-navigation">
|
30
|
+
<a href="./table_of_contents.html#pages">Pages</a>
|
31
|
+
<a href="./table_of_contents.html#classes">Classes</a>
|
32
|
+
<a href="./table_of_contents.html#methods">Methods</a>
|
33
|
+
</div>
|
34
|
+
</div>
|
35
|
+
|
36
|
+
<div id="search-section" role="search" class="project-section initially-hidden">
|
37
|
+
<form action="#" method="get" accept-charset="utf-8">
|
38
|
+
<div id="search-field-wrapper">
|
39
|
+
<input id="search-field" role="combobox" aria-label="Search"
|
40
|
+
aria-autocomplete="list" aria-controls="search-results"
|
41
|
+
type="text" name="search" placeholder="Search" spellcheck="false"
|
42
|
+
title="Type to search, Up and Down to navigate, Enter to load">
|
43
|
+
</div>
|
44
|
+
|
45
|
+
<ul id="search-results" aria-label="Search Results"
|
46
|
+
aria-busy="false" aria-expanded="false"
|
47
|
+
aria-atomic="false" class="initially-hidden"></ul>
|
48
|
+
</form>
|
49
|
+
</div>
|
50
|
+
|
51
|
+
</div>
|
52
|
+
|
53
|
+
|
54
|
+
|
55
|
+
<div id="class-metadata">
|
56
|
+
|
57
|
+
<div id="parent-class-section" class="nav-section">
|
58
|
+
<h3>Parent</h3>
|
59
|
+
|
60
|
+
|
61
|
+
<p class="link"><a href="Object.html">Object</a>
|
62
|
+
|
63
|
+
</div>
|
64
|
+
|
65
|
+
|
66
|
+
|
67
|
+
<!-- Method Quickref -->
|
68
|
+
<div id="method-list-section" class="nav-section">
|
69
|
+
<h3>Methods</h3>
|
70
|
+
|
71
|
+
<ul class="link-list" role="directory">
|
72
|
+
|
73
|
+
<li ><a href="#method-i-bar">#bar</a>
|
74
|
+
|
75
|
+
<li ><a href="#method-i-foo">#foo</a>
|
76
|
+
|
77
|
+
</ul>
|
78
|
+
</div>
|
79
|
+
|
80
|
+
</div>
|
81
|
+
</nav>
|
82
|
+
|
83
|
+
<main role="main" aria-labelledby="class-Foo">
|
84
|
+
<h1 id="class-Foo" class="class">
|
85
|
+
class Foo
|
86
|
+
</h1>
|
87
|
+
|
88
|
+
<section class="description">
|
89
|
+
|
90
|
+
</section>
|
91
|
+
|
92
|
+
|
93
|
+
|
94
|
+
|
95
|
+
<section id="5Buntitled-5D" class="documentation-section">
|
96
|
+
|
97
|
+
|
98
|
+
|
99
|
+
|
100
|
+
|
101
|
+
|
102
|
+
|
103
|
+
|
104
|
+
|
105
|
+
<section id="public-instance-5Buntitled-5D-method-details" class="method-section">
|
106
|
+
<header>
|
107
|
+
<h3>Public Instance Methods</h3>
|
108
|
+
</header>
|
109
|
+
|
110
|
+
|
111
|
+
<div id="method-i-bar" class="method-detail ">
|
112
|
+
|
113
|
+
<div class="method-heading">
|
114
|
+
<span class="method-name">bar</span><span
|
115
|
+
class="method-args">()</span>
|
116
|
+
|
117
|
+
<span class="method-click-advice">click to toggle source</span>
|
118
|
+
|
119
|
+
</div>
|
120
|
+
|
121
|
+
|
122
|
+
<div class="method-description">
|
123
|
+
|
124
|
+
|
125
|
+
|
126
|
+
|
127
|
+
|
128
|
+
|
129
|
+
<div class="method-source-code" id="bar-source">
|
130
|
+
<pre><span class="ruby-comment"># File examples/example_instance.rb, line 16</span>
|
131
|
+
<span class="ruby-keyword">def</span> <span class="ruby-identifier">bar</span>; <span class="ruby-keyword">end</span></pre>
|
132
|
+
</div>
|
133
|
+
|
134
|
+
</div>
|
135
|
+
|
136
|
+
|
137
|
+
|
138
|
+
|
139
|
+
</div>
|
140
|
+
|
141
|
+
|
142
|
+
<div id="method-i-foo" class="method-detail ">
|
143
|
+
|
144
|
+
<div class="method-heading">
|
145
|
+
<span class="method-name">foo</span><span
|
146
|
+
class="method-args">()</span>
|
147
|
+
|
148
|
+
<span class="method-click-advice">click to toggle source</span>
|
149
|
+
|
150
|
+
</div>
|
151
|
+
|
152
|
+
|
153
|
+
<div class="method-description">
|
154
|
+
|
155
|
+
|
156
|
+
|
157
|
+
|
158
|
+
|
159
|
+
|
160
|
+
<div class="method-source-code" id="foo-source">
|
161
|
+
<pre><span class="ruby-comment"># File examples/example_instance.rb, line 15</span>
|
162
|
+
<span class="ruby-keyword">def</span> <span class="ruby-identifier">foo</span>; <span class="ruby-keyword">end</span></pre>
|
163
|
+
</div>
|
164
|
+
|
165
|
+
</div>
|
166
|
+
|
167
|
+
|
168
|
+
|
169
|
+
|
170
|
+
</div>
|
171
|
+
|
172
|
+
|
173
|
+
</section>
|
174
|
+
|
175
|
+
</section>
|
176
|
+
</main>
|
177
|
+
|
178
|
+
|
179
|
+
<footer id="validator-badges" role="contentinfo">
|
180
|
+
<p><a href="http://validator.w3.org/check/referer">Validate</a>
|
181
|
+
<p>Generated by <a href="http://docs.seattlerb.org/rdoc/">RDoc</a> 4.2.0.
|
182
|
+
<p>Based on <a href="http://deveiate.org/projects/Darkfish-RDoc/">Darkfish</a> by <a href="http://deveiate.org">Michael Granger</a>.
|
183
|
+
</footer>
|
184
|
+
|
data/doc/Interface.html
ADDED
@@ -0,0 +1,278 @@
|
|
1
|
+
<!DOCTYPE html>
|
2
|
+
|
3
|
+
<html>
|
4
|
+
<head>
|
5
|
+
<meta charset="UTF-8">
|
6
|
+
|
7
|
+
<title>module Interface - RDoc Documentation</title>
|
8
|
+
|
9
|
+
<script type="text/javascript">
|
10
|
+
var rdoc_rel_prefix = "./";
|
11
|
+
</script>
|
12
|
+
|
13
|
+
<script src="./js/jquery.js"></script>
|
14
|
+
<script src="./js/darkfish.js"></script>
|
15
|
+
|
16
|
+
<link href="./css/fonts.css" rel="stylesheet">
|
17
|
+
<link href="./css/rdoc.css" rel="stylesheet">
|
18
|
+
|
19
|
+
|
20
|
+
|
21
|
+
<body id="top" role="document" class="module">
|
22
|
+
<nav role="navigation">
|
23
|
+
<div id="project-navigation">
|
24
|
+
<div id="home-section" role="region" title="Quick navigation" class="nav-section">
|
25
|
+
<h2>
|
26
|
+
<a href="./index.html" rel="home">Home</a>
|
27
|
+
</h2>
|
28
|
+
|
29
|
+
<div id="table-of-contents-navigation">
|
30
|
+
<a href="./table_of_contents.html#pages">Pages</a>
|
31
|
+
<a href="./table_of_contents.html#classes">Classes</a>
|
32
|
+
<a href="./table_of_contents.html#methods">Methods</a>
|
33
|
+
</div>
|
34
|
+
</div>
|
35
|
+
|
36
|
+
<div id="search-section" role="search" class="project-section initially-hidden">
|
37
|
+
<form action="#" method="get" accept-charset="utf-8">
|
38
|
+
<div id="search-field-wrapper">
|
39
|
+
<input id="search-field" role="combobox" aria-label="Search"
|
40
|
+
aria-autocomplete="list" aria-controls="search-results"
|
41
|
+
type="text" name="search" placeholder="Search" spellcheck="false"
|
42
|
+
title="Type to search, Up and Down to navigate, Enter to load">
|
43
|
+
</div>
|
44
|
+
|
45
|
+
<ul id="search-results" aria-label="Search Results"
|
46
|
+
aria-busy="false" aria-expanded="false"
|
47
|
+
aria-atomic="false" class="initially-hidden"></ul>
|
48
|
+
</form>
|
49
|
+
</div>
|
50
|
+
|
51
|
+
</div>
|
52
|
+
|
53
|
+
|
54
|
+
|
55
|
+
<div id="class-metadata">
|
56
|
+
|
57
|
+
|
58
|
+
|
59
|
+
|
60
|
+
<!-- Method Quickref -->
|
61
|
+
<div id="method-list-section" class="nav-section">
|
62
|
+
<h3>Methods</h3>
|
63
|
+
|
64
|
+
<ul class="link-list" role="directory">
|
65
|
+
|
66
|
+
<li ><a href="#method-i-private_visible">#private_visible</a>
|
67
|
+
|
68
|
+
<li ><a href="#method-i-public_visible">#public_visible</a>
|
69
|
+
|
70
|
+
<li ><a href="#method-i-required_public_methods">#required_public_methods</a>
|
71
|
+
|
72
|
+
<li ><a href="#method-i-unrequired_methods">#unrequired_methods</a>
|
73
|
+
|
74
|
+
</ul>
|
75
|
+
</div>
|
76
|
+
|
77
|
+
</div>
|
78
|
+
</nav>
|
79
|
+
|
80
|
+
<main role="main" aria-labelledby="module-Interface">
|
81
|
+
<h1 id="module-Interface" class="module">
|
82
|
+
module Interface
|
83
|
+
</h1>
|
84
|
+
|
85
|
+
<section class="description">
|
86
|
+
|
87
|
+
<p>A module for implementing Java style interfaces in Ruby. For more
|
88
|
+
information about Java interfaces, please see:</p>
|
89
|
+
|
90
|
+
<p><a
|
91
|
+
href="http://java.sun.com/docs/books/tutorial/java/concepts/interface.html">java.sun.com/docs/books/tutorial/java/concepts/interface.html</a></p>
|
92
|
+
|
93
|
+
</section>
|
94
|
+
|
95
|
+
|
96
|
+
|
97
|
+
|
98
|
+
<section id="5Buntitled-5D" class="documentation-section">
|
99
|
+
|
100
|
+
|
101
|
+
|
102
|
+
|
103
|
+
|
104
|
+
<section class="constants-list">
|
105
|
+
<header>
|
106
|
+
<h3>Constants</h3>
|
107
|
+
</header>
|
108
|
+
<dl>
|
109
|
+
|
110
|
+
<dt id="VERSION">VERSION
|
111
|
+
|
112
|
+
<dd><p>The version of the interface library.</p>
|
113
|
+
|
114
|
+
|
115
|
+
</dl>
|
116
|
+
</section>
|
117
|
+
|
118
|
+
|
119
|
+
|
120
|
+
|
121
|
+
|
122
|
+
<section id="public-instance-5Buntitled-5D-method-details" class="method-section">
|
123
|
+
<header>
|
124
|
+
<h3>Public Instance Methods</h3>
|
125
|
+
</header>
|
126
|
+
|
127
|
+
|
128
|
+
<div id="method-i-private_visible" class="method-detail ">
|
129
|
+
|
130
|
+
<div class="method-heading">
|
131
|
+
<span class="method-name">private_visible</span><span
|
132
|
+
class="method-args">(*ids)</span>
|
133
|
+
|
134
|
+
<span class="method-click-advice">click to toggle source</span>
|
135
|
+
|
136
|
+
</div>
|
137
|
+
|
138
|
+
|
139
|
+
<div class="method-description">
|
140
|
+
|
141
|
+
|
142
|
+
|
143
|
+
|
144
|
+
|
145
|
+
|
146
|
+
<div class="method-source-code" id="private_visible-source">
|
147
|
+
<pre><span class="ruby-comment"># File lib/interface.rb, line 87</span>
|
148
|
+
<span class="ruby-keyword">def</span> <span class="ruby-identifier">private_visible</span>(<span class="ruby-operator">*</span><span class="ruby-identifier">ids</span>)
|
149
|
+
<span class="ruby-identifier">spec</span> = <span class="ruby-identifier">map_spec</span>(<span class="ruby-operator">*</span><span class="ruby-identifier">ids</span>)
|
150
|
+
<span class="ruby-ivar">@private_ids</span>.<span class="ruby-identifier">merge</span>(<span class="ruby-identifier">spec</span>)
|
151
|
+
<span class="ruby-keyword">end</span></pre>
|
152
|
+
</div>
|
153
|
+
|
154
|
+
</div>
|
155
|
+
|
156
|
+
|
157
|
+
|
158
|
+
|
159
|
+
</div>
|
160
|
+
|
161
|
+
|
162
|
+
<div id="method-i-public_visible" class="method-detail ">
|
163
|
+
|
164
|
+
<div class="method-heading">
|
165
|
+
<span class="method-name">public_visible</span><span
|
166
|
+
class="method-args">(*ids)</span>
|
167
|
+
|
168
|
+
<span class="method-click-advice">click to toggle source</span>
|
169
|
+
|
170
|
+
</div>
|
171
|
+
|
172
|
+
|
173
|
+
<div class="method-description">
|
174
|
+
|
175
|
+
|
176
|
+
|
177
|
+
|
178
|
+
|
179
|
+
|
180
|
+
<div class="method-source-code" id="public_visible-source">
|
181
|
+
<pre><span class="ruby-comment"># File lib/interface.rb, line 82</span>
|
182
|
+
<span class="ruby-keyword">def</span> <span class="ruby-identifier">public_visible</span>(<span class="ruby-operator">*</span><span class="ruby-identifier">ids</span>)
|
183
|
+
<span class="ruby-identifier">spec</span> = <span class="ruby-identifier">map_spec</span>(<span class="ruby-operator">*</span><span class="ruby-identifier">ids</span>)
|
184
|
+
<span class="ruby-ivar">@ids</span>.<span class="ruby-identifier">merge</span>(<span class="ruby-identifier">spec</span>)
|
185
|
+
<span class="ruby-keyword">end</span></pre>
|
186
|
+
</div>
|
187
|
+
|
188
|
+
</div>
|
189
|
+
|
190
|
+
|
191
|
+
|
192
|
+
|
193
|
+
</div>
|
194
|
+
|
195
|
+
|
196
|
+
<div id="method-i-required_public_methods" class="method-detail ">
|
197
|
+
|
198
|
+
<div class="method-heading">
|
199
|
+
<span class="method-name">required_public_methods</span><span
|
200
|
+
class="method-args">()</span>
|
201
|
+
|
202
|
+
<span class="method-click-advice">click to toggle source</span>
|
203
|
+
|
204
|
+
</div>
|
205
|
+
|
206
|
+
|
207
|
+
<div class="method-description">
|
208
|
+
|
209
|
+
<p>Accepts an array of method names that define the interface. When this
|
210
|
+
module is included/implemented, those method names must have already been
|
211
|
+
defined.</p>
|
212
|
+
|
213
|
+
|
214
|
+
|
215
|
+
|
216
|
+
<div class="method-source-code" id="required_public_methods-source">
|
217
|
+
<pre><span class="ruby-comment"># File lib/interface.rb, line 78</span>
|
218
|
+
<span class="ruby-keyword">def</span> <span class="ruby-identifier">required_public_methods</span>
|
219
|
+
<span class="ruby-ivar">@ids</span>
|
220
|
+
<span class="ruby-keyword">end</span></pre>
|
221
|
+
</div>
|
222
|
+
|
223
|
+
</div>
|
224
|
+
|
225
|
+
|
226
|
+
|
227
|
+
|
228
|
+
</div>
|
229
|
+
|
230
|
+
|
231
|
+
<div id="method-i-unrequired_methods" class="method-detail ">
|
232
|
+
|
233
|
+
<div class="method-heading">
|
234
|
+
<span class="method-name">unrequired_methods</span><span
|
235
|
+
class="method-args">(*ids)</span>
|
236
|
+
|
237
|
+
<span class="method-click-advice">click to toggle source</span>
|
238
|
+
|
239
|
+
</div>
|
240
|
+
|
241
|
+
|
242
|
+
<div class="method-description">
|
243
|
+
|
244
|
+
<p>Accepts an array of method names that are removed as a requirement for
|
245
|
+
implementation. Presumably you would use this in a sub-interface where you
|
246
|
+
only wanted a partial implementation of an existing interface.</p>
|
247
|
+
|
248
|
+
|
249
|
+
|
250
|
+
|
251
|
+
<div class="method-source-code" id="unrequired_methods-source">
|
252
|
+
<pre><span class="ruby-comment"># File lib/interface.rb, line 95</span>
|
253
|
+
<span class="ruby-keyword">def</span> <span class="ruby-identifier">unrequired_methods</span>(<span class="ruby-operator">*</span><span class="ruby-identifier">ids</span>)
|
254
|
+
<span class="ruby-ivar">@unreq</span> <span class="ruby-operator">||=</span> []
|
255
|
+
<span class="ruby-ivar">@unreq</span> <span class="ruby-operator">+=</span> <span class="ruby-identifier">ids</span>
|
256
|
+
<span class="ruby-keyword">end</span></pre>
|
257
|
+
</div>
|
258
|
+
|
259
|
+
</div>
|
260
|
+
|
261
|
+
|
262
|
+
|
263
|
+
|
264
|
+
</div>
|
265
|
+
|
266
|
+
|
267
|
+
</section>
|
268
|
+
|
269
|
+
</section>
|
270
|
+
</main>
|
271
|
+
|
272
|
+
|
273
|
+
<footer id="validator-badges" role="contentinfo">
|
274
|
+
<p><a href="http://validator.w3.org/check/referer">Validate</a>
|
275
|
+
<p>Generated by <a href="http://docs.seattlerb.org/rdoc/">RDoc</a> 4.2.0.
|
276
|
+
<p>Based on <a href="http://deveiate.org/projects/Darkfish-RDoc/">Darkfish</a> by <a href="http://deveiate.org">Michael Granger</a>.
|
277
|
+
</footer>
|
278
|
+
|