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/Rakefile.html
ADDED
@@ -0,0 +1,148 @@
|
|
1
|
+
<!DOCTYPE html>
|
2
|
+
|
3
|
+
<html>
|
4
|
+
<head>
|
5
|
+
<meta charset="UTF-8">
|
6
|
+
|
7
|
+
<title>Rakefile - 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="file">
|
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="project-metadata">
|
56
|
+
<div id="fileindex-section" class="nav-section">
|
57
|
+
<h3>Pages</h3>
|
58
|
+
|
59
|
+
<ul class="link-list">
|
60
|
+
|
61
|
+
<li><a href="./CHANGES.html">CHANGES</a>
|
62
|
+
|
63
|
+
<li><a href="./MANIFEST.html">MANIFEST</a>
|
64
|
+
|
65
|
+
<li><a href="./README.html">README</a>
|
66
|
+
|
67
|
+
<li><a href="./Rakefile.html">Rakefile</a>
|
68
|
+
|
69
|
+
<li><a href="./certs/djberg96_pub_pem.html">djberg96_pub.pem</a>
|
70
|
+
|
71
|
+
<li><a href="./interface_gemspec.html">interface.gemspec</a>
|
72
|
+
|
73
|
+
</ul>
|
74
|
+
</div>
|
75
|
+
|
76
|
+
</div>
|
77
|
+
</nav>
|
78
|
+
|
79
|
+
<main role="main" aria-label="Page Rakefile">
|
80
|
+
|
81
|
+
<p>require 'rake' require 'rake/clean' require
|
82
|
+
'rake/testtask'</p>
|
83
|
+
|
84
|
+
<p>CLEAN.include(“** .gem”, “ *.rbc”)</p>
|
85
|
+
|
86
|
+
<p>namespace :gem do</p>
|
87
|
+
|
88
|
+
<pre class="ruby"><span class="ruby-identifier">desc</span> <span class="ruby-string">"Create the interface gem"</span>
|
89
|
+
<span class="ruby-identifier">task</span> :<span class="ruby-identifier">create</span> =<span class="ruby-operator">></span> [:<span class="ruby-identifier">clean</span>] <span class="ruby-keyword">do</span>
|
90
|
+
<span class="ruby-identifier">require</span> <span class="ruby-string">'rubygems/package'</span>
|
91
|
+
<span class="ruby-identifier">spec</span> = <span class="ruby-identifier">eval</span>(<span class="ruby-constant">IO</span>.<span class="ruby-identifier">read</span>(<span class="ruby-string">'interface.gemspec'</span>))
|
92
|
+
<span class="ruby-identifier">spec</span>.<span class="ruby-identifier">signing_key</span> = <span class="ruby-constant">File</span>.<span class="ruby-identifier">join</span>(<span class="ruby-constant">Dir</span>.<span class="ruby-identifier">home</span>, <span class="ruby-string">'.ssh'</span>, <span class="ruby-string">'gem-private_key.pem'</span>)
|
93
|
+
<span class="ruby-constant">Gem</span><span class="ruby-operator">::</span><span class="ruby-constant">Package</span>.<span class="ruby-identifier">build</span>(<span class="ruby-identifier">spec</span>, <span class="ruby-keyword">true</span>)
|
94
|
+
<span class="ruby-keyword">end</span>
|
95
|
+
|
96
|
+
<span class="ruby-identifier">desc</span> <span class="ruby-string">"Install the interface gem"</span>
|
97
|
+
<span class="ruby-identifier">task</span> :<span class="ruby-identifier">install</span> =<span class="ruby-operator">></span> [:<span class="ruby-identifier">create</span>] <span class="ruby-keyword">do</span>
|
98
|
+
<span class="ruby-identifier">file</span> = <span class="ruby-constant">Dir</span>[<span class="ruby-string">"*.gem"</span>].<span class="ruby-identifier">first</span>
|
99
|
+
<span class="ruby-identifier">sh</span> <span class="ruby-node">"gem install -l #{file}"</span>
|
100
|
+
<span class="ruby-keyword">end</span>
|
101
|
+
</pre>
|
102
|
+
|
103
|
+
<p>end</p>
|
104
|
+
|
105
|
+
<p>namespace :example do</p>
|
106
|
+
|
107
|
+
<pre class="ruby"><span class="ruby-identifier">desc</span> <span class="ruby-string">'Run the example_instance.rb sample program'</span>
|
108
|
+
<span class="ruby-identifier">task</span> :<span class="ruby-identifier">instance</span> <span class="ruby-keyword">do</span>
|
109
|
+
<span class="ruby-identifier">ruby</span> <span class="ruby-string">'-Ilib examples/example_instance.rb'</span>
|
110
|
+
<span class="ruby-keyword">end</span>
|
111
|
+
|
112
|
+
<span class="ruby-identifier">desc</span> <span class="ruby-string">'Run the example_interface.rb sample program'</span>
|
113
|
+
<span class="ruby-identifier">task</span> :<span class="ruby-identifier">interface</span> <span class="ruby-keyword">do</span>
|
114
|
+
<span class="ruby-identifier">ruby</span> <span class="ruby-string">'-Ilib examples/example_interface.rb'</span>
|
115
|
+
<span class="ruby-keyword">end</span>
|
116
|
+
|
117
|
+
<span class="ruby-identifier">desc</span> <span class="ruby-string">'Run the example_sub.rb sample program'</span>
|
118
|
+
<span class="ruby-identifier">task</span> :<span class="ruby-identifier">sub</span> <span class="ruby-keyword">do</span>
|
119
|
+
<span class="ruby-identifier">ruby</span> <span class="ruby-string">'-Ilib examples/example_sub.rb'</span>
|
120
|
+
<span class="ruby-keyword">end</span>
|
121
|
+
|
122
|
+
<span class="ruby-identifier">desc</span> <span class="ruby-string">'Run the example_unrequire.rb sample program'</span>
|
123
|
+
<span class="ruby-identifier">task</span> :<span class="ruby-identifier">unrequire</span> <span class="ruby-keyword">do</span>
|
124
|
+
<span class="ruby-identifier">ruby</span> <span class="ruby-string">'-Ilib examples/example_unrequire.rb'</span>
|
125
|
+
<span class="ruby-keyword">end</span>
|
126
|
+
</pre>
|
127
|
+
|
128
|
+
<p>end</p>
|
129
|
+
|
130
|
+
<p>Rake::TestTask.new do |t|</p>
|
131
|
+
|
132
|
+
<pre class="ruby"><span class="ruby-identifier">t</span>.<span class="ruby-identifier">verbose</span> = <span class="ruby-keyword">true</span>
|
133
|
+
<span class="ruby-identifier">t</span>.<span class="ruby-identifier">warning</span> = <span class="ruby-keyword">true</span>
|
134
|
+
</pre>
|
135
|
+
|
136
|
+
<p>end</p>
|
137
|
+
|
138
|
+
<p>task :default => :test</p>
|
139
|
+
</main>
|
140
|
+
|
141
|
+
|
142
|
+
|
143
|
+
<footer id="validator-badges" role="contentinfo">
|
144
|
+
<p><a href="http://validator.w3.org/check/referer">Validate</a>
|
145
|
+
<p>Generated by <a href="http://docs.seattlerb.org/rdoc/">RDoc</a> 4.2.0.
|
146
|
+
<p>Based on <a href="http://deveiate.org/projects/Darkfish-RDoc/">Darkfish</a> by <a href="http://deveiate.org">Michael Granger</a>.
|
147
|
+
</footer>
|
148
|
+
|
@@ -0,0 +1,438 @@
|
|
1
|
+
<!DOCTYPE html>
|
2
|
+
|
3
|
+
<html>
|
4
|
+
<head>
|
5
|
+
<meta charset="UTF-8">
|
6
|
+
|
7
|
+
<title>class TC_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="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">Test::Unit::TestCase
|
62
|
+
|
63
|
+
</div>
|
64
|
+
|
65
|
+
|
66
|
+
|
67
|
+
<!-- Method Quickref -->
|
68
|
+
<div id="method-list-section" class="nav-section">
|
69
|
+
<h3>Methods</h3>
|
70
|
+
|
71
|
+
<ul class="link-list" role="directory">
|
72
|
+
|
73
|
+
<li ><a href="#method-c-startup">::startup</a>
|
74
|
+
|
75
|
+
<li ><a href="#method-i-checker_method">#checker_method</a>
|
76
|
+
|
77
|
+
<li ><a href="#method-i-test_alpha_interface_requirements_met">#test_alpha_interface_requirements_met</a>
|
78
|
+
|
79
|
+
<li ><a href="#method-i-test_gamma_interface_requirements_met">#test_gamma_interface_requirements_met</a>
|
80
|
+
|
81
|
+
<li ><a href="#method-i-test_interface_requirements_not_met">#test_interface_requirements_not_met</a>
|
82
|
+
|
83
|
+
<li ><a href="#method-i-test_method_check">#test_method_check</a>
|
84
|
+
|
85
|
+
<li ><a href="#method-i-test_sub_interface_requirements_not_met">#test_sub_interface_requirements_not_met</a>
|
86
|
+
|
87
|
+
<li ><a href="#method-i-test_version">#test_version</a>
|
88
|
+
|
89
|
+
</ul>
|
90
|
+
</div>
|
91
|
+
|
92
|
+
</div>
|
93
|
+
</nav>
|
94
|
+
|
95
|
+
<main role="main" aria-labelledby="class-TC_Interface">
|
96
|
+
<h1 id="class-TC_Interface" class="class">
|
97
|
+
class TC_Interface
|
98
|
+
</h1>
|
99
|
+
|
100
|
+
<section class="description">
|
101
|
+
|
102
|
+
</section>
|
103
|
+
|
104
|
+
|
105
|
+
|
106
|
+
|
107
|
+
<section id="5Buntitled-5D" class="documentation-section">
|
108
|
+
|
109
|
+
|
110
|
+
|
111
|
+
|
112
|
+
|
113
|
+
|
114
|
+
|
115
|
+
|
116
|
+
|
117
|
+
<section id="public-class-5Buntitled-5D-method-details" class="method-section">
|
118
|
+
<header>
|
119
|
+
<h3>Public Class Methods</h3>
|
120
|
+
</header>
|
121
|
+
|
122
|
+
|
123
|
+
<div id="method-c-startup" class="method-detail ">
|
124
|
+
|
125
|
+
<div class="method-heading">
|
126
|
+
<span class="method-name">startup</span><span
|
127
|
+
class="method-args">()</span>
|
128
|
+
|
129
|
+
<span class="method-click-advice">click to toggle source</span>
|
130
|
+
|
131
|
+
</div>
|
132
|
+
|
133
|
+
|
134
|
+
<div class="method-description">
|
135
|
+
|
136
|
+
|
137
|
+
|
138
|
+
|
139
|
+
|
140
|
+
|
141
|
+
<div class="method-source-code" id="startup-source">
|
142
|
+
<pre><span class="ruby-comment"># File test/test_interface.rb, line 10</span>
|
143
|
+
<span class="ruby-keyword">def</span> <span class="ruby-keyword">self</span>.<span class="ruby-identifier">startup</span>
|
144
|
+
<span class="ruby-identifier">alpha_interface</span> = <span class="ruby-identifier">interface</span>{
|
145
|
+
<span class="ruby-identifier">public_visible</span> <span class="ruby-value">:alpha</span>, <span class="ruby-value">:beta</span>
|
146
|
+
}
|
147
|
+
|
148
|
+
<span class="ruby-identifier">gamma_interface</span> = <span class="ruby-identifier">interface</span>{
|
149
|
+
<span class="ruby-identifier">extends</span> <span class="ruby-identifier">alpha_interface</span>
|
150
|
+
<span class="ruby-identifier">public_visible</span> <span class="ruby-value">:gamma</span>
|
151
|
+
<span class="ruby-identifier">unrequired_methods</span> <span class="ruby-value">:alpha</span>
|
152
|
+
}
|
153
|
+
|
154
|
+
<span class="ruby-comment"># Workaround for 1.9.x</span>
|
155
|
+
<span class="ruby-identifier">@@alpha_interface</span> = <span class="ruby-identifier">alpha_interface</span>
|
156
|
+
<span class="ruby-identifier">@@gamma_interface</span> = <span class="ruby-identifier">gamma_interface</span>
|
157
|
+
|
158
|
+
<span class="ruby-identifier">eval</span>(<span class="ruby-string">"class A; end"</span>)
|
159
|
+
|
160
|
+
<span class="ruby-identifier">eval</span>(<span class="ruby-string">"
|
161
|
+
class B
|
162
|
+
def alpha; end
|
163
|
+
def beta; end
|
164
|
+
end
|
165
|
+
"</span>)
|
166
|
+
|
167
|
+
<span class="ruby-identifier">eval</span>(<span class="ruby-string">"
|
168
|
+
class C
|
169
|
+
def beta; end
|
170
|
+
def gamma; end
|
171
|
+
end
|
172
|
+
"</span>)
|
173
|
+
<span class="ruby-keyword">end</span></pre>
|
174
|
+
</div>
|
175
|
+
|
176
|
+
</div>
|
177
|
+
|
178
|
+
|
179
|
+
|
180
|
+
|
181
|
+
</div>
|
182
|
+
|
183
|
+
|
184
|
+
</section>
|
185
|
+
|
186
|
+
<section id="public-instance-5Buntitled-5D-method-details" class="method-section">
|
187
|
+
<header>
|
188
|
+
<h3>Public Instance Methods</h3>
|
189
|
+
</header>
|
190
|
+
|
191
|
+
|
192
|
+
<div id="method-i-checker_method" class="method-detail ">
|
193
|
+
|
194
|
+
<div class="method-heading">
|
195
|
+
<span class="method-name">checker_method</span><span
|
196
|
+
class="method-args">(arg)</span>
|
197
|
+
|
198
|
+
<span class="method-click-advice">click to toggle source</span>
|
199
|
+
|
200
|
+
</div>
|
201
|
+
|
202
|
+
|
203
|
+
<div class="method-description">
|
204
|
+
|
205
|
+
|
206
|
+
|
207
|
+
|
208
|
+
|
209
|
+
|
210
|
+
<div class="method-source-code" id="checker_method-source">
|
211
|
+
<pre><span class="ruby-comment"># File test/test_interface.rb, line 43</span>
|
212
|
+
<span class="ruby-keyword">def</span> <span class="ruby-identifier">checker_method</span>(<span class="ruby-identifier">arg</span>)
|
213
|
+
<span class="ruby-identifier">check_interface</span> { { <span class="ruby-identifier">@@gamma_interface</span> =<span class="ruby-operator">></span> <span class="ruby-identifier">arg</span> }}
|
214
|
+
<span class="ruby-keyword">end</span></pre>
|
215
|
+
</div>
|
216
|
+
|
217
|
+
</div>
|
218
|
+
|
219
|
+
|
220
|
+
|
221
|
+
|
222
|
+
</div>
|
223
|
+
|
224
|
+
|
225
|
+
<div id="method-i-test_alpha_interface_requirements_met" class="method-detail ">
|
226
|
+
|
227
|
+
<div class="method-heading">
|
228
|
+
<span class="method-name">test_alpha_interface_requirements_met</span><span
|
229
|
+
class="method-args">()</span>
|
230
|
+
|
231
|
+
<span class="method-click-advice">click to toggle source</span>
|
232
|
+
|
233
|
+
</div>
|
234
|
+
|
235
|
+
|
236
|
+
<div class="method-description">
|
237
|
+
|
238
|
+
|
239
|
+
|
240
|
+
|
241
|
+
|
242
|
+
|
243
|
+
<div class="method-source-code" id="test_alpha_interface_requirements_met-source">
|
244
|
+
<pre><span class="ruby-comment"># File test/test_interface.rb, line 61</span>
|
245
|
+
<span class="ruby-keyword">def</span> <span class="ruby-identifier">test_alpha_interface_requirements_met</span>
|
246
|
+
<span class="ruby-identifier">assert_nothing_raised</span>{ <span class="ruby-constant">B</span>.<span class="ruby-identifier">new</span>.<span class="ruby-identifier">extend</span>(<span class="ruby-identifier">@@alpha_interface</span>) }
|
247
|
+
<span class="ruby-keyword">end</span></pre>
|
248
|
+
</div>
|
249
|
+
|
250
|
+
</div>
|
251
|
+
|
252
|
+
|
253
|
+
|
254
|
+
|
255
|
+
</div>
|
256
|
+
|
257
|
+
|
258
|
+
<div id="method-i-test_gamma_interface_requirements_met" class="method-detail ">
|
259
|
+
|
260
|
+
<div class="method-heading">
|
261
|
+
<span class="method-name">test_gamma_interface_requirements_met</span><span
|
262
|
+
class="method-args">()</span>
|
263
|
+
|
264
|
+
<span class="method-click-advice">click to toggle source</span>
|
265
|
+
|
266
|
+
</div>
|
267
|
+
|
268
|
+
|
269
|
+
<div class="method-description">
|
270
|
+
|
271
|
+
|
272
|
+
|
273
|
+
|
274
|
+
|
275
|
+
|
276
|
+
<div class="method-source-code" id="test_gamma_interface_requirements_met-source">
|
277
|
+
<pre><span class="ruby-comment"># File test/test_interface.rb, line 65</span>
|
278
|
+
<span class="ruby-keyword">def</span> <span class="ruby-identifier">test_gamma_interface_requirements_met</span>
|
279
|
+
<span class="ruby-identifier">assert_nothing_raised</span>{ <span class="ruby-constant">C</span>.<span class="ruby-identifier">new</span>.<span class="ruby-identifier">extend</span>(<span class="ruby-identifier">@@gamma_interface</span>) }
|
280
|
+
<span class="ruby-keyword">end</span></pre>
|
281
|
+
</div>
|
282
|
+
|
283
|
+
</div>
|
284
|
+
|
285
|
+
|
286
|
+
|
287
|
+
|
288
|
+
</div>
|
289
|
+
|
290
|
+
|
291
|
+
<div id="method-i-test_interface_requirements_not_met" class="method-detail ">
|
292
|
+
|
293
|
+
<div class="method-heading">
|
294
|
+
<span class="method-name">test_interface_requirements_not_met</span><span
|
295
|
+
class="method-args">()</span>
|
296
|
+
|
297
|
+
<span class="method-click-advice">click to toggle source</span>
|
298
|
+
|
299
|
+
</div>
|
300
|
+
|
301
|
+
|
302
|
+
<div class="method-description">
|
303
|
+
|
304
|
+
|
305
|
+
|
306
|
+
|
307
|
+
|
308
|
+
|
309
|
+
<div class="method-source-code" id="test_interface_requirements_not_met-source">
|
310
|
+
<pre><span class="ruby-comment"># File test/test_interface.rb, line 51</span>
|
311
|
+
<span class="ruby-keyword">def</span> <span class="ruby-identifier">test_interface_requirements_not_met</span>
|
312
|
+
<span class="ruby-identifier">assert_raise</span>(<span class="ruby-constant">Interface</span><span class="ruby-operator">::</span><span class="ruby-constant">PublicVisibleMethodMissing</span>){ <span class="ruby-constant">A</span>.<span class="ruby-identifier">extend</span>(<span class="ruby-identifier">@@alpha_interface</span>) }
|
313
|
+
<span class="ruby-identifier">assert_raise</span>(<span class="ruby-constant">Interface</span><span class="ruby-operator">::</span><span class="ruby-constant">PublicVisibleMethodMissing</span>){ <span class="ruby-constant">A</span>.<span class="ruby-identifier">new</span>.<span class="ruby-identifier">extend</span>(<span class="ruby-identifier">@@alpha_interface</span>) }
|
314
|
+
<span class="ruby-keyword">end</span></pre>
|
315
|
+
</div>
|
316
|
+
|
317
|
+
</div>
|
318
|
+
|
319
|
+
|
320
|
+
|
321
|
+
|
322
|
+
</div>
|
323
|
+
|
324
|
+
|
325
|
+
<div id="method-i-test_method_check" class="method-detail ">
|
326
|
+
|
327
|
+
<div class="method-heading">
|
328
|
+
<span class="method-name">test_method_check</span><span
|
329
|
+
class="method-args">()</span>
|
330
|
+
|
331
|
+
<span class="method-click-advice">click to toggle source</span>
|
332
|
+
|
333
|
+
</div>
|
334
|
+
|
335
|
+
|
336
|
+
<div class="method-description">
|
337
|
+
|
338
|
+
|
339
|
+
|
340
|
+
|
341
|
+
|
342
|
+
|
343
|
+
<div class="method-source-code" id="test_method_check-source">
|
344
|
+
<pre><span class="ruby-comment"># File test/test_interface.rb, line 69</span>
|
345
|
+
<span class="ruby-keyword">def</span> <span class="ruby-identifier">test_method_check</span>
|
346
|
+
<span class="ruby-identifier">assert_nothing_raised</span> { <span class="ruby-identifier">checker_method</span>(<span class="ruby-constant">C</span>.<span class="ruby-identifier">implements</span>(<span class="ruby-identifier">@@gamma_interface</span>).<span class="ruby-identifier">new</span>) }
|
347
|
+
<span class="ruby-constant">B</span>.<span class="ruby-identifier">implements</span>(<span class="ruby-identifier">@@alpha_interface</span>)
|
348
|
+
<span class="ruby-identifier">assert_raise</span>(<span class="ruby-constant">ArgumentError</span>) { <span class="ruby-identifier">checker_method</span>(<span class="ruby-constant">B</span>.<span class="ruby-identifier">implements</span>(<span class="ruby-identifier">@@alpha_interface</span>).<span class="ruby-identifier">new</span>) }
|
349
|
+
<span class="ruby-keyword">end</span></pre>
|
350
|
+
</div>
|
351
|
+
|
352
|
+
</div>
|
353
|
+
|
354
|
+
|
355
|
+
|
356
|
+
|
357
|
+
</div>
|
358
|
+
|
359
|
+
|
360
|
+
<div id="method-i-test_sub_interface_requirements_not_met" class="method-detail ">
|
361
|
+
|
362
|
+
<div class="method-heading">
|
363
|
+
<span class="method-name">test_sub_interface_requirements_not_met</span><span
|
364
|
+
class="method-args">()</span>
|
365
|
+
|
366
|
+
<span class="method-click-advice">click to toggle source</span>
|
367
|
+
|
368
|
+
</div>
|
369
|
+
|
370
|
+
|
371
|
+
<div class="method-description">
|
372
|
+
|
373
|
+
|
374
|
+
|
375
|
+
|
376
|
+
|
377
|
+
|
378
|
+
<div class="method-source-code" id="test_sub_interface_requirements_not_met-source">
|
379
|
+
<pre><span class="ruby-comment"># File test/test_interface.rb, line 56</span>
|
380
|
+
<span class="ruby-keyword">def</span> <span class="ruby-identifier">test_sub_interface_requirements_not_met</span>
|
381
|
+
<span class="ruby-identifier">assert_raise</span>(<span class="ruby-constant">Interface</span><span class="ruby-operator">::</span><span class="ruby-constant">PublicVisibleMethodMissing</span>){ <span class="ruby-constant">B</span>.<span class="ruby-identifier">extend</span>(<span class="ruby-identifier">@@gamma_interface</span>) }
|
382
|
+
<span class="ruby-identifier">assert_raise</span>(<span class="ruby-constant">Interface</span><span class="ruby-operator">::</span><span class="ruby-constant">PublicVisibleMethodMissing</span>){ <span class="ruby-constant">B</span>.<span class="ruby-identifier">new</span>.<span class="ruby-identifier">extend</span>(<span class="ruby-identifier">@@gamma_interface</span>) }
|
383
|
+
<span class="ruby-keyword">end</span></pre>
|
384
|
+
</div>
|
385
|
+
|
386
|
+
</div>
|
387
|
+
|
388
|
+
|
389
|
+
|
390
|
+
|
391
|
+
</div>
|
392
|
+
|
393
|
+
|
394
|
+
<div id="method-i-test_version" class="method-detail ">
|
395
|
+
|
396
|
+
<div class="method-heading">
|
397
|
+
<span class="method-name">test_version</span><span
|
398
|
+
class="method-args">()</span>
|
399
|
+
|
400
|
+
<span class="method-click-advice">click to toggle source</span>
|
401
|
+
|
402
|
+
</div>
|
403
|
+
|
404
|
+
|
405
|
+
<div class="method-description">
|
406
|
+
|
407
|
+
|
408
|
+
|
409
|
+
|
410
|
+
|
411
|
+
|
412
|
+
<div class="method-source-code" id="test_version-source">
|
413
|
+
<pre><span class="ruby-comment"># File test/test_interface.rb, line 47</span>
|
414
|
+
<span class="ruby-keyword">def</span> <span class="ruby-identifier">test_version</span>
|
415
|
+
<span class="ruby-identifier">assert_equal</span>(<span class="ruby-string">'1.0.4'</span>, <span class="ruby-constant">Interface</span><span class="ruby-operator">::</span><span class="ruby-constant">VERSION</span>)
|
416
|
+
<span class="ruby-keyword">end</span></pre>
|
417
|
+
</div>
|
418
|
+
|
419
|
+
</div>
|
420
|
+
|
421
|
+
|
422
|
+
|
423
|
+
|
424
|
+
</div>
|
425
|
+
|
426
|
+
|
427
|
+
</section>
|
428
|
+
|
429
|
+
</section>
|
430
|
+
</main>
|
431
|
+
|
432
|
+
|
433
|
+
<footer id="validator-badges" role="contentinfo">
|
434
|
+
<p><a href="http://validator.w3.org/check/referer">Validate</a>
|
435
|
+
<p>Generated by <a href="http://docs.seattlerb.org/rdoc/">RDoc</a> 4.2.0.
|
436
|
+
<p>Based on <a href="http://deveiate.org/projects/Darkfish-RDoc/">Darkfish</a> by <a href="http://deveiate.org">Michael Granger</a>.
|
437
|
+
</footer>
|
438
|
+
|