netlinx-compile 1.0.0 → 2.0.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.
Files changed (73) hide show
  1. checksums.yaml +4 -4
  2. data/README.md +14 -0
  3. data/bin/netlinx-compile +0 -0
  4. data/doc/NetLinx.html +119 -151
  5. data/doc/NetLinx/Compile.html +119 -148
  6. data/doc/NetLinx/Compile/Extension.html +115 -145
  7. data/doc/NetLinx/Compile/Extension/AXS.html +217 -154
  8. data/doc/NetLinx/Compile/ExtensionDiscovery.html +479 -321
  9. data/doc/NetLinx/Compile/ExtensionHandler.html +703 -396
  10. data/doc/NetLinx/Compile/Script.html +390 -282
  11. data/doc/NetLinx/Compiler.html +375 -288
  12. data/doc/NetLinx/CompilerResult.html +1102 -498
  13. data/doc/NetLinx/NoCompilerError.html +135 -155
  14. data/doc/NetLinx/SourceFile.html +608 -423
  15. data/doc/_index.html +215 -0
  16. data/doc/class_list.html +58 -0
  17. data/doc/css/common.css +1 -0
  18. data/doc/css/full_list.css +57 -0
  19. data/doc/css/style.css +339 -0
  20. data/doc/file.README.html +94 -0
  21. data/doc/file.license.html +73 -0
  22. data/doc/file_list.html +63 -0
  23. data/doc/frames.html +26 -0
  24. data/doc/index.html +94 -103
  25. data/doc/js/app.js +219 -0
  26. data/doc/js/full_list.js +181 -0
  27. data/doc/js/jquery.js +4 -18
  28. data/doc/method_list.html +261 -0
  29. data/doc/top-level-namespace.html +112 -0
  30. data/lib/test/netlinx/compilable.rb +13 -48
  31. data/lib/test/netlinx/compile/discoverable.rb +3 -14
  32. data/lib/test/netlinx/compile/invokable.rb +3 -15
  33. metadata +98 -67
  34. data/README.txt +0 -2
  35. data/doc/Test.html +0 -147
  36. data/doc/Test/NetLinx.html +0 -147
  37. data/doc/Test/NetLinx/Compilable.html +0 -148
  38. data/doc/Test/NetLinx/Compile.html +0 -146
  39. data/doc/Test/NetLinx/Compile/Discoverable.html +0 -148
  40. data/doc/Test/NetLinx/Compile/Invokable.html +0 -149
  41. data/doc/created.rid +0 -12
  42. data/doc/images/add.png +0 -0
  43. data/doc/images/arrow_up.png +0 -0
  44. data/doc/images/brick.png +0 -0
  45. data/doc/images/brick_link.png +0 -0
  46. data/doc/images/bug.png +0 -0
  47. data/doc/images/bullet_black.png +0 -0
  48. data/doc/images/bullet_toggle_minus.png +0 -0
  49. data/doc/images/bullet_toggle_plus.png +0 -0
  50. data/doc/images/date.png +0 -0
  51. data/doc/images/delete.png +0 -0
  52. data/doc/images/find.png +0 -0
  53. data/doc/images/loadingAnimation.gif +0 -0
  54. data/doc/images/macFFBgHack.png +0 -0
  55. data/doc/images/package.png +0 -0
  56. data/doc/images/page_green.png +0 -0
  57. data/doc/images/page_white_text.png +0 -0
  58. data/doc/images/page_white_width.png +0 -0
  59. data/doc/images/plugin.png +0 -0
  60. data/doc/images/ruby.png +0 -0
  61. data/doc/images/tag_blue.png +0 -0
  62. data/doc/images/tag_green.png +0 -0
  63. data/doc/images/transparent.png +0 -0
  64. data/doc/images/wrench.png +0 -0
  65. data/doc/images/wrench_orange.png +0 -0
  66. data/doc/images/zoom.png +0 -0
  67. data/doc/js/darkfish.js +0 -155
  68. data/doc/js/navigation.js +0 -142
  69. data/doc/js/search.js +0 -94
  70. data/doc/js/search_index.js +0 -1
  71. data/doc/js/searcher.js +0 -228
  72. data/doc/rdoc.css +0 -595
  73. data/doc/table_of_contents.html +0 -138
@@ -1,293 +1,401 @@
1
- <!DOCTYPE html>
2
-
3
- <html>
4
- <head>
5
- <meta content="text/html; charset=UTF-8" http-equiv="Content-Type">
6
-
7
- <title>class NetLinx::Compile::Script - RDoc Documentation</title>
8
-
9
- <link type="text/css" media="screen" href="../../rdoc.css" rel="stylesheet">
10
-
11
- <script type="text/javascript">
12
- var rdoc_rel_prefix = "../../";
13
- </script>
14
-
15
- <script type="text/javascript" charset="utf-8" src="../../js/jquery.js"></script>
16
- <script type="text/javascript" charset="utf-8" src="../../js/navigation.js"></script>
17
- <script type="text/javascript" charset="utf-8" src="../../js/search_index.js"></script>
18
- <script type="text/javascript" charset="utf-8" src="../../js/search.js"></script>
19
- <script type="text/javascript" charset="utf-8" src="../../js/searcher.js"></script>
20
- <script type="text/javascript" charset="utf-8" src="../../js/darkfish.js"></script>
21
-
22
-
23
- <body id="top" class="class">
24
- <nav id="metadata">
25
- <nav id="home-section" class="section">
26
- <h3 class="section-header">
27
- <a href="../../index.html">Home</a>
28
- <a href="../../table_of_contents.html#classes">Classes</a>
29
- <a href="../../table_of_contents.html#methods">Methods</a>
30
- </h3>
31
- </nav>
32
-
33
-
34
- <nav id="search-section" class="section project-section" class="initially-hidden">
35
- <form action="#" method="get" accept-charset="utf-8">
36
- <h3 class="section-header">
37
- <input type="text" name="search" placeholder="Search" id="search-field"
38
- title="Type to search, Up and Down to navigate, Enter to load">
39
- </h3>
40
- </form>
41
-
42
- <ul id="search-results" class="initially-hidden"></ul>
43
- </nav>
44
-
45
-
46
-
47
-
48
- <div id="file-metadata">
49
- <nav id="file-list-section" class="section">
50
- <h3 class="section-header">Defined In</h3>
51
- <ul>
52
- <li>lib/netlinx/compile/script.rb
53
- </ul>
54
- </nav>
55
-
56
-
57
- </div>
58
-
59
- <div id="class-metadata">
60
-
61
- <nav id="parent-class-section" class="section">
62
- <h3 class="section-header">Parent</h3>
63
-
64
- <p class="link">Object
65
-
66
- </nav>
67
-
68
-
69
-
70
- <!-- Method Quickref -->
71
- <nav id="method-list-section" class="section">
72
- <h3 class="section-header">Methods</h3>
73
-
74
- <ul class="link-list">
75
-
76
- <li ><a href="#method-c-run">::run</a>
77
-
78
- </ul>
79
- </nav>
80
-
81
- </div>
82
-
83
- <div id="project-metadata">
84
-
85
- <nav id="classindex-section" class="section project-section">
86
- <h3 class="section-header">Class and Module Index</h3>
87
-
88
- <ul class="link-list">
89
-
90
- <li><a href="../../NetLinx.html">NetLinx</a>
91
-
92
- <li><a href="../../NetLinx/Compile.html">NetLinx::Compile</a>
93
-
94
- <li><a href="../../NetLinx/Compile/Extension.html">NetLinx::Compile::Extension</a>
95
-
96
- <li><a href="../../NetLinx/Compile/Extension/AXS.html">NetLinx::Compile::Extension::AXS</a>
97
-
98
- <li><a href="../../NetLinx/Compile/ExtensionDiscovery.html">NetLinx::Compile::ExtensionDiscovery</a>
99
-
100
- <li><a href="../../NetLinx/Compile/ExtensionHandler.html">NetLinx::Compile::ExtensionHandler</a>
101
-
102
- <li><a href="../../NetLinx/Compile/Script.html">NetLinx::Compile::Script</a>
103
-
104
- <li><a href="../../NetLinx/Compiler.html">NetLinx::Compiler</a>
105
-
106
- <li><a href="../../NetLinx/CompilerResult.html">NetLinx::CompilerResult</a>
107
-
108
- <li><a href="../../NetLinx/NoCompilerError.html">NetLinx::NoCompilerError</a>
109
-
110
- <li><a href="../../NetLinx/SourceFile.html">NetLinx::SourceFile</a>
111
-
112
- <li><a href="../../Test.html">Test</a>
113
-
114
- <li><a href="../../Test/NetLinx.html">Test::NetLinx</a>
115
-
116
- <li><a href="../../Test/NetLinx/Compilable.html">Test::NetLinx::Compilable</a>
117
-
118
- <li><a href="../../Test/NetLinx/Compile.html">Test::NetLinx::Compile</a>
119
-
120
- <li><a href="../../Test/NetLinx/Compile/Discoverable.html">Test::NetLinx::Compile::Discoverable</a>
121
-
122
- <li><a href="../../Test/NetLinx/Compile/Invokable.html">Test::NetLinx::Compile::Invokable</a>
123
-
124
- </ul>
125
- </nav>
126
-
127
- </div>
128
- </nav>
129
-
130
- <div id="documentation">
131
- <h1 class="class">class NetLinx::Compile::Script</h1>
132
-
133
- <div id="description" class="description">
134
-
135
- <p>The container for the script that runs when netlinx-compile is executed.</p>
136
-
137
- </div><!-- description -->
138
-
139
-
140
-
141
-
142
- <section id="5Buntitled-5D" class="documentation-section">
143
-
144
-
145
-
146
-
147
-
148
-
149
-
150
-
151
- <!-- Methods -->
152
-
153
- <section id="public-class-5Buntitled-5D-method-details" class="method-section section">
154
- <h3 class="section-header">Public Class Methods</h3>
155
-
156
-
157
- <div id="method-c-run" class="method-detail ">
158
-
159
- <div class="method-heading">
160
- <span class="method-name">run</span><span
161
- class="method-args">(**kvargs)</span>
162
-
163
- <span class="method-click-advice">click to toggle source</span>
164
-
165
- </div>
166
-
167
-
168
- <div class="method-description">
169
-
170
- <p>Run the script.</p>
171
-
172
-
173
-
174
-
175
- <div class="method-source-code" id="run-source">
176
- <pre><span class="ruby-comment"># File lib/netlinx/compile/script.rb, line 13</span>
177
- <span class="ruby-keyword">def</span> <span class="ruby-identifier">run</span>(<span class="ruby-operator">**</span><span class="ruby-identifier">kvargs</span>)
178
- <span class="ruby-comment"># :argv is a convenience to override ARGV, like for testing.</span>
179
- <span class="ruby-identifier">args</span> = <span class="ruby-identifier">kvargs</span>.<span class="ruby-identifier">fetch</span> <span class="ruby-value">:argv</span>, <span class="ruby-constant">ARGV</span>
180
-
181
- <span class="ruby-comment"># Command line options.</span>
182
- <span class="ruby-ivar">@options</span> = <span class="ruby-constant">OpenStruct</span>.<span class="ruby-identifier">new</span> <span class="ruby-identifier">source</span><span class="ruby-operator">:</span> <span class="ruby-string">&#39;&#39;</span>,
183
- <span class="ruby-identifier">include_paths</span><span class="ruby-operator">:</span> [],
184
- <span class="ruby-identifier">use_workspace</span><span class="ruby-operator">:</span> <span class="ruby-keyword">false</span>
185
-
186
- <span class="ruby-constant">OptionParser</span>.<span class="ruby-identifier">new</span> <span class="ruby-keyword">do</span> <span class="ruby-operator">|</span><span class="ruby-identifier">opts</span><span class="ruby-operator">|</span>
187
- <span class="ruby-identifier">opts</span>.<span class="ruby-identifier">banner</span> = <span class="ruby-string">&quot;Usage: netlinx-compile [options]&quot;</span>
1
+ <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
2
+ "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
3
+ <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
4
+ <head>
5
+ <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
6
+ <title>
7
+ Class: NetLinx::Compile::Script
8
+
9
+ &mdash; Documentation by YARD 0.8.7.6
10
+
11
+ </title>
12
+
13
+ <link rel="stylesheet" href="../../css/style.css" type="text/css" charset="utf-8" />
14
+
15
+ <link rel="stylesheet" href="../../css/common.css" type="text/css" charset="utf-8" />
16
+
17
+ <script type="text/javascript" charset="utf-8">
18
+ hasFrames = window.top.frames.main ? true : false;
19
+ relpath = '../../';
20
+ framesUrl = "../../frames.html#!NetLinx/Compile/Script.html";
21
+ </script>
22
+
23
+
24
+ <script type="text/javascript" charset="utf-8" src="../../js/jquery.js"></script>
25
+
26
+ <script type="text/javascript" charset="utf-8" src="../../js/app.js"></script>
27
+
28
+
29
+ </head>
30
+ <body>
31
+ <div id="header">
32
+ <div id="menu">
33
+
34
+ <a href="../../_index.html">Index (S)</a> &raquo;
35
+ <span class='title'><span class='object_link'><a href="../../NetLinx.html" title="NetLinx (module)">NetLinx</a></span></span> &raquo; <span class='title'><span class='object_link'><a href="../Compile.html" title="NetLinx::Compile (module)">Compile</a></span></span>
36
+ &raquo;
37
+ <span class="title">Script</span>
38
+
39
+
40
+ <div class="noframes"><span class="title">(</span><a href="." target="_top">no frames</a><span class="title">)</span></div>
41
+ </div>
42
+
43
+ <div id="search">
44
+
45
+ <a class="full_list_link" id="class_list_link"
46
+ href="../../class_list.html">
47
+ Class List
48
+ </a>
49
+
50
+ <a class="full_list_link" id="method_list_link"
51
+ href="../../method_list.html">
52
+ Method List
53
+ </a>
54
+
55
+ <a class="full_list_link" id="file_list_link"
56
+ href="../../file_list.html">
57
+ File List
58
+ </a>
59
+
60
+ </div>
61
+ <div class="clear"></div>
62
+ </div>
63
+
64
+ <iframe id="search_frame"></iframe>
65
+
66
+ <div id="content"><h1>Class: NetLinx::Compile::Script
67
+
68
+
69
+
70
+ </h1>
71
+
72
+ <dl class="box">
73
+
74
+ <dt class="r1">Inherits:</dt>
75
+ <dd class="r1">
76
+ <span class="inheritName">Object</span>
77
+
78
+ <ul class="fullTree">
79
+ <li>Object</li>
80
+
81
+ <li class="next">NetLinx::Compile::Script</li>
82
+
83
+ </ul>
84
+ <a href="#" class="inheritanceTree">show all</a>
85
+
86
+ </dd>
87
+
88
+
89
+
90
+
91
+
92
+
93
+
94
+
95
+
96
+ <dt class="r2 last">Defined in:</dt>
97
+ <dd class="r2 last">lib/netlinx/compile/script.rb</dd>
98
+
99
+ </dl>
100
+ <div class="clear"></div>
101
+
102
+ <h2>Overview</h2><div class="docstring">
103
+ <div class="discussion">
104
+
105
+ <p>The container for the script that runs when netlinx-compile is executed.</p>
106
+
107
+
108
+ </div>
109
+ </div>
110
+ <div class="tags">
111
+
112
+
113
+ </div>
114
+
115
+
116
+
117
+
118
+
119
+
120
+
121
+ <h2>
122
+ Class Method Summary
123
+ <small>(<a href="#" class="summary_toggle">collapse</a>)</small>
124
+ </h2>
125
+
126
+ <ul class="summary">
127
+
128
+ <li class="public ">
129
+ <span class="summary_signature">
130
+
131
+ <a href="#run-class_method" title="run (class method)">+ (Object) <strong>run</strong>(**kvargs) </a>
132
+
133
+
134
+
135
+ </span>
136
+
137
+
138
+
139
+
140
+
141
+
142
+
143
+
144
+
145
+ <span class="summary_desc"><div class='inline'>
146
+ <p>Run the script.</p>
147
+ </div></span>
148
+
149
+ </li>
150
+
151
+
152
+ </ul>
153
+
154
+
155
+
156
+
157
+ <div id="class_method_details" class="method_details_list">
158
+ <h2>Class Method Details</h2>
159
+
160
+
161
+ <div class="method_details first">
162
+ <h3 class="signature first" id="run-class_method">
163
+
164
+ + (<tt>Object</tt>) <strong>run</strong>(**kvargs)
165
+
166
+
167
+
168
+
169
+
170
+ </h3><div class="docstring">
171
+ <div class="discussion">
172
+
173
+ <p>Run the script.</p>
174
+
175
+
176
+ </div>
177
+ </div>
178
+ <div class="tags">
179
+
180
+
181
+ </div><table class="source_code">
182
+ <tr>
183
+ <td>
184
+ <pre class="lines">
185
+
186
+
187
+ 13
188
+ 14
189
+ 15
190
+ 16
191
+ 17
192
+ 18
193
+ 19
194
+ 20
195
+ 21
196
+ 22
197
+ 23
198
+ 24
199
+ 25
200
+ 26
201
+ 27
202
+ 28
203
+ 29
204
+ 30
205
+ 31
206
+ 32
207
+ 33
208
+ 34
209
+ 35
210
+ 36
211
+ 37
212
+ 38
213
+ 39
214
+ 40
215
+ 41
216
+ 42
217
+ 43
218
+ 44
219
+ 45
220
+ 46
221
+ 47
222
+ 48
223
+ 49
224
+ 50
225
+ 51
226
+ 52
227
+ 53
228
+ 54
229
+ 55
230
+ 56
231
+ 57
232
+ 58
233
+ 59
234
+ 60
235
+ 61
236
+ 62
237
+ 63
238
+ 64
239
+ 65
240
+ 66
241
+ 67
242
+ 68
243
+ 69
244
+ 70
245
+ 71
246
+ 72
247
+ 73
248
+ 74
249
+ 75
250
+ 76
251
+ 77
252
+ 78
253
+ 79
254
+ 80
255
+ 81
256
+ 82
257
+ 83
258
+ 84
259
+ 85
260
+ 86
261
+ 87
262
+ 88
263
+ 89
264
+ 90
265
+ 91
266
+ 92
267
+ 93
268
+ 94
269
+ 95
270
+ 96
271
+ 97
272
+ 98
273
+ 99
274
+ 100
275
+ 101
276
+ 102
277
+ 103
278
+ 104
279
+ 105
280
+ 106
281
+ 107
282
+ 108
283
+ 109</pre>
284
+ </td>
285
+ <td>
286
+ <pre class="code"><span class="info file"># File 'lib/netlinx/compile/script.rb', line 13</span>
287
+
288
+ <span class='kw'>def</span> <span class='id identifier rubyid_run'>run</span><span class='lparen'>(</span><span class='op'>**</span><span class='id identifier rubyid_kvargs'>kvargs</span><span class='rparen'>)</span>
289
+ <span class='comment'># :argv is a convenience to override ARGV, like for testing.
290
+ </span> <span class='id identifier rubyid_args'>args</span> <span class='op'>=</span> <span class='id identifier rubyid_kvargs'>kvargs</span><span class='period'>.</span><span class='id identifier rubyid_fetch'>fetch</span> <span class='symbol'>:argv</span><span class='comma'>,</span> <span class='const'>ARGV</span>
291
+
292
+ <span class='comment'># Command line options.
293
+ </span> <span class='ivar'>@options</span> <span class='op'>=</span> <span class='const'>OpenStruct</span><span class='period'>.</span><span class='id identifier rubyid_new'>new</span> \
294
+ <span class='label'>source:</span> <span class='tstring'><span class='tstring_beg'>&#39;</span><span class='tstring_end'>&#39;</span></span><span class='comma'>,</span>
295
+ <span class='label'>include_paths:</span> <span class='lbracket'>[</span><span class='rbracket'>]</span><span class='comma'>,</span>
296
+ <span class='label'>use_workspace:</span> <span class='kw'>false</span>
297
+
298
+ <span class='const'>OptionParser</span><span class='period'>.</span><span class='id identifier rubyid_new'>new</span> <span class='kw'>do</span> <span class='op'>|</span><span class='id identifier rubyid_opts'>opts</span><span class='op'>|</span>
299
+ <span class='id identifier rubyid_opts'>opts</span><span class='period'>.</span><span class='id identifier rubyid_banner'>banner</span> <span class='op'>=</span> <span class='tstring'><span class='tstring_beg'>&quot;</span><span class='tstring_content'>Usage: netlinx-compile [options]</span><span class='tstring_end'>&quot;</span></span>
188
300
 
189
- <span class="ruby-identifier">opts</span>.<span class="ruby-identifier">on</span> <span class="ruby-string">&#39;-h&#39;</span>, <span class="ruby-string">&#39;--help&#39;</span>, <span class="ruby-string">&#39;Display this help screen.&#39;</span> <span class="ruby-keyword">do</span>
190
- <span class="ruby-identifier">puts</span> <span class="ruby-identifier">opts</span>
191
- <span class="ruby-identifier">exit</span>
192
- <span class="ruby-keyword">end</span>
301
+ <span class='id identifier rubyid_opts'>opts</span><span class='period'>.</span><span class='id identifier rubyid_on'>on</span> <span class='tstring'><span class='tstring_beg'>&#39;</span><span class='tstring_content'>-h</span><span class='tstring_end'>&#39;</span></span><span class='comma'>,</span> <span class='tstring'><span class='tstring_beg'>&#39;</span><span class='tstring_content'>--help</span><span class='tstring_end'>&#39;</span></span><span class='comma'>,</span> <span class='tstring'><span class='tstring_beg'>&#39;</span><span class='tstring_content'>Display this help screen.</span><span class='tstring_end'>&#39;</span></span> <span class='kw'>do</span>
302
+ <span class='id identifier rubyid_puts'>puts</span> <span class='id identifier rubyid_opts'>opts</span>
303
+ <span class='id identifier rubyid_exit'>exit</span>
304
+ <span class='kw'>end</span>
193
305
 
194
- <span class="ruby-identifier">opts</span>.<span class="ruby-identifier">on</span> <span class="ruby-string">&#39;-s&#39;</span>, <span class="ruby-string">&#39;--source FILE&#39;</span>, <span class="ruby-string">&#39;Source file to compile.&#39;</span> <span class="ruby-keyword">do</span> <span class="ruby-operator">|</span><span class="ruby-identifier">v</span><span class="ruby-operator">|</span>
195
- <span class="ruby-ivar">@options</span>.<span class="ruby-identifier">source</span> = <span class="ruby-identifier">v</span>
196
- <span class="ruby-keyword">end</span>
306
+ <span class='id identifier rubyid_opts'>opts</span><span class='period'>.</span><span class='id identifier rubyid_on'>on</span> <span class='tstring'><span class='tstring_beg'>&#39;</span><span class='tstring_content'>-s</span><span class='tstring_end'>&#39;</span></span><span class='comma'>,</span> <span class='tstring'><span class='tstring_beg'>&#39;</span><span class='tstring_content'>--source FILE</span><span class='tstring_end'>&#39;</span></span><span class='comma'>,</span> <span class='tstring'><span class='tstring_beg'>&#39;</span><span class='tstring_content'>Source file to compile.</span><span class='tstring_end'>&#39;</span></span> <span class='kw'>do</span> <span class='op'>|</span><span class='id identifier rubyid_v'>v</span><span class='op'>|</span>
307
+ <span class='ivar'>@options</span><span class='period'>.</span><span class='id identifier rubyid_source'>source</span> <span class='op'>=</span> <span class='id identifier rubyid_v'>v</span>
308
+ <span class='kw'>end</span>
197
309
 
198
- <span class="ruby-identifier">opts</span>.<span class="ruby-identifier">on</span> <span class="ruby-string">&#39;-i&#39;</span>, <span class="ruby-string">&#39;--include [Path1,Path2]&#39;</span>, <span class="ruby-constant">Array</span>, <span class="ruby-string">&#39;Additional include and module paths.&#39;</span> <span class="ruby-keyword">do</span> <span class="ruby-operator">|</span><span class="ruby-identifier">v</span><span class="ruby-operator">|</span>
199
- <span class="ruby-ivar">@options</span>.<span class="ruby-identifier">include_paths</span> = <span class="ruby-identifier">v</span>
200
- <span class="ruby-keyword">end</span>
310
+ <span class='id identifier rubyid_opts'>opts</span><span class='period'>.</span><span class='id identifier rubyid_on'>on</span> <span class='tstring'><span class='tstring_beg'>&#39;</span><span class='tstring_content'>-i</span><span class='tstring_end'>&#39;</span></span><span class='comma'>,</span> <span class='tstring'><span class='tstring_beg'>&#39;</span><span class='tstring_content'>--include [Path1,Path2]</span><span class='tstring_end'>&#39;</span></span><span class='comma'>,</span> <span class='const'>Array</span><span class='comma'>,</span> <span class='tstring'><span class='tstring_beg'>&#39;</span><span class='tstring_content'>Additional include and module paths.</span><span class='tstring_end'>&#39;</span></span> <span class='kw'>do</span> <span class='op'>|</span><span class='id identifier rubyid_v'>v</span><span class='op'>|</span>
311
+ <span class='ivar'>@options</span><span class='period'>.</span><span class='id identifier rubyid_include_paths'>include_paths</span> <span class='op'>=</span> <span class='id identifier rubyid_v'>v</span>
312
+ <span class='kw'>end</span>
201
313
 
202
- <span class="ruby-identifier">opts</span>.<span class="ruby-identifier">on</span> <span class="ruby-string">&#39;-w&#39;</span>, <span class="ruby-string">&#39;--workspace&#39;</span>, <span class="ruby-string">&#39;--smart&#39;</span>,
203
- <span class="ruby-string">&#39;Search up directory tree for a workspace&#39;</span>,
204
- <span class="ruby-string">&#39;containing the source file.&#39;</span> <span class="ruby-keyword">do</span> <span class="ruby-operator">|</span><span class="ruby-identifier">v</span><span class="ruby-operator">|</span>
205
- <span class="ruby-ivar">@options</span>.<span class="ruby-identifier">use_workspace</span> = <span class="ruby-identifier">v</span>
206
- <span class="ruby-keyword">end</span>
314
+ <span class='id identifier rubyid_opts'>opts</span><span class='period'>.</span><span class='id identifier rubyid_on'>on</span> <span class='tstring'><span class='tstring_beg'>&#39;</span><span class='tstring_content'>-w</span><span class='tstring_end'>&#39;</span></span><span class='comma'>,</span> <span class='tstring'><span class='tstring_beg'>&#39;</span><span class='tstring_content'>--workspace</span><span class='tstring_end'>&#39;</span></span><span class='comma'>,</span> <span class='tstring'><span class='tstring_beg'>&#39;</span><span class='tstring_content'>--smart</span><span class='tstring_end'>&#39;</span></span><span class='comma'>,</span>
315
+ <span class='tstring'><span class='tstring_beg'>&#39;</span><span class='tstring_content'>Search up directory tree for a workspace</span><span class='tstring_end'>&#39;</span></span><span class='comma'>,</span>
316
+ <span class='tstring'><span class='tstring_beg'>&#39;</span><span class='tstring_content'>containing the source file.</span><span class='tstring_end'>&#39;</span></span> <span class='kw'>do</span> <span class='op'>|</span><span class='id identifier rubyid_v'>v</span><span class='op'>|</span>
317
+ <span class='ivar'>@options</span><span class='period'>.</span><span class='id identifier rubyid_use_workspace'>use_workspace</span> <span class='op'>=</span> <span class='id identifier rubyid_v'>v</span>
318
+ <span class='kw'>end</span>
207
319
 
208
- <span class="ruby-keyword">end</span>.<span class="ruby-identifier">parse!</span> <span class="ruby-identifier">args</span>
209
-
210
- <span class="ruby-keyword">if</span> <span class="ruby-ivar">@options</span>.<span class="ruby-identifier">source</span>.<span class="ruby-identifier">empty?</span>
211
- <span class="ruby-identifier">puts</span> <span class="ruby-string">&quot;No source file specified.\nRun \&quot;netlinx-compile -h\&quot; for help.&quot;</span>
212
- <span class="ruby-identifier">exit</span>
213
- <span class="ruby-keyword">end</span>
214
-
215
- <span class="ruby-comment"># Find an ExtensionHandler for the given file.</span>
216
- <span class="ruby-constant">ExtensionDiscovery</span>.<span class="ruby-identifier">discover</span>
217
- <span class="ruby-identifier">source_file</span> = <span class="ruby-constant">File</span>.<span class="ruby-identifier">expand_path</span> <span class="ruby-ivar">@options</span>.<span class="ruby-identifier">source</span>
218
- <span class="ruby-identifier">handler</span> = <span class="ruby-constant">NetLinx</span><span class="ruby-operator">::</span><span class="ruby-constant">Compile</span><span class="ruby-operator">::</span><span class="ruby-constant">ExtensionDiscovery</span>.<span class="ruby-identifier">get_handler</span> <span class="ruby-identifier">source_file</span>
219
-
220
- <span class="ruby-comment"># If the handler is a workspace handler, go straight to compiling it.</span>
221
- <span class="ruby-comment"># Otherwise, if the use_workspace flag is true, search up through the</span>
222
- <span class="ruby-comment"># directory tree to try to find a workspace that includes the</span>
223
- <span class="ruby-comment"># specified source file.</span>
224
- <span class="ruby-keyword">if</span> (<span class="ruby-keyword">not</span> <span class="ruby-identifier">handler</span>.<span class="ruby-identifier">is_a_workspace?</span>) <span class="ruby-operator">&amp;&amp;</span> <span class="ruby-ivar">@options</span>.<span class="ruby-identifier">use_workspace</span>
225
- <span class="ruby-identifier">workspace_extensions</span> = <span class="ruby-constant">NetLinx</span><span class="ruby-operator">::</span><span class="ruby-constant">Compile</span><span class="ruby-operator">::</span><span class="ruby-constant">ExtensionDiscovery</span>.<span class="ruby-identifier">workspace_extensions</span>
320
+ <span class='kw'>end</span><span class='period'>.</span><span class='id identifier rubyid_parse!'>parse!</span> <span class='id identifier rubyid_args'>args</span>
321
+
322
+ <span class='kw'>if</span> <span class='ivar'>@options</span><span class='period'>.</span><span class='id identifier rubyid_source'>source</span><span class='period'>.</span><span class='id identifier rubyid_empty?'>empty?</span>
323
+ <span class='id identifier rubyid_puts'>puts</span> <span class='tstring'><span class='tstring_beg'>&quot;</span><span class='tstring_content'>No source file specified.\nRun \&quot;netlinx-compile -h\&quot; for help.</span><span class='tstring_end'>&quot;</span></span>
324
+ <span class='id identifier rubyid_exit'>exit</span>
325
+ <span class='kw'>end</span>
326
+
327
+ <span class='comment'># Find an ExtensionHandler for the given file.
328
+ </span> <span class='const'>ExtensionDiscovery</span><span class='period'>.</span><span class='id identifier rubyid_discover'>discover</span>
329
+ <span class='id identifier rubyid_source_file'>source_file</span> <span class='op'>=</span> <span class='const'>File</span><span class='period'>.</span><span class='id identifier rubyid_expand_path'>expand_path</span> <span class='ivar'>@options</span><span class='period'>.</span><span class='id identifier rubyid_source'>source</span>
330
+ <span class='id identifier rubyid_handler'>handler</span> <span class='op'>=</span> <span class='const'>NetLinx</span><span class='op'>::</span><span class='const'>Compile</span><span class='op'>::</span><span class='const'>ExtensionDiscovery</span><span class='period'>.</span><span class='id identifier rubyid_get_handler'>get_handler</span> <span class='id identifier rubyid_source_file'>source_file</span>
331
+
332
+ <span class='comment'># If the handler is a workspace handler, go straight to compiling it.
333
+ </span> <span class='comment'># Otherwise, if the use_workspace flag is true, search up through the
334
+ </span> <span class='comment'># directory tree to try to find a workspace that includes the
335
+ </span> <span class='comment'># specified source file.
336
+ </span> <span class='kw'>if</span> <span class='lparen'>(</span><span class='kw'>not</span> <span class='id identifier rubyid_handler'>handler</span><span class='period'>.</span><span class='id identifier rubyid_is_a_workspace?'>is_a_workspace?</span><span class='rparen'>)</span> <span class='op'>&amp;&amp;</span> <span class='ivar'>@options</span><span class='period'>.</span><span class='id identifier rubyid_use_workspace'>use_workspace</span>
337
+ <span class='id identifier rubyid_workspace_extensions'>workspace_extensions</span> <span class='op'>=</span> <span class='const'>NetLinx</span><span class='op'>::</span><span class='const'>Compile</span><span class='op'>::</span><span class='const'>ExtensionDiscovery</span><span class='period'>.</span><span class='id identifier rubyid_workspace_extensions'>workspace_extensions</span>
226
338
 
227
- <span class="ruby-identifier">dir</span> = <span class="ruby-constant">File</span>.<span class="ruby-identifier">expand_path</span> <span class="ruby-string">&#39;.&#39;</span>
228
- <span class="ruby-keyword">while</span> <span class="ruby-identifier">dir</span> <span class="ruby-operator">!=</span> <span class="ruby-constant">File</span>.<span class="ruby-identifier">expand_path</span>(<span class="ruby-string">&#39;..&#39;</span>, <span class="ruby-identifier">dir</span>) <span class="ruby-keyword">do</span>
229
- <span class="ruby-identifier">workspaces</span> = <span class="ruby-constant">Dir</span>[<span class="ruby-node">&quot;#{dir}/*.{#{workspace_extensions.join &#39;,&#39;}}&quot;</span>]
339
+ <span class='id identifier rubyid_dir'>dir</span> <span class='op'>=</span> <span class='const'>File</span><span class='period'>.</span><span class='id identifier rubyid_expand_path'>expand_path</span> <span class='tstring'><span class='tstring_beg'>&#39;</span><span class='tstring_content'>.</span><span class='tstring_end'>&#39;</span></span>
340
+ <span class='kw'>while</span> <span class='id identifier rubyid_dir'>dir</span> <span class='op'>!=</span> <span class='const'>File</span><span class='period'>.</span><span class='id identifier rubyid_expand_path'>expand_path</span><span class='lparen'>(</span><span class='tstring'><span class='tstring_beg'>&#39;</span><span class='tstring_content'>..</span><span class='tstring_end'>&#39;</span></span><span class='comma'>,</span> <span class='id identifier rubyid_dir'>dir</span><span class='rparen'>)</span> <span class='kw'>do</span>
341
+ <span class='id identifier rubyid_workspaces'>workspaces</span> <span class='op'>=</span> <span class='const'>Dir</span><span class='lbracket'>[</span><span class='tstring'><span class='tstring_beg'>&quot;</span><span class='embexpr_beg'>#{</span><span class='id identifier rubyid_dir'>dir</span><span class='embexpr_end'>}</span><span class='tstring_content'>/*.{</span><span class='embexpr_beg'>#{</span><span class='id identifier rubyid_workspace_extensions'>workspace_extensions</span><span class='period'>.</span><span class='id identifier rubyid_join'>join</span> <span class='tstring'><span class='tstring_beg'>&#39;</span><span class='tstring_content'>,</span><span class='tstring_end'>&#39;</span></span><span class='embexpr_end'>}</span><span class='tstring_content'>}</span><span class='tstring_end'>&quot;</span></span><span class='rbracket'>]</span>
230
342
 
231
- <span class="ruby-keyword">unless</span> <span class="ruby-identifier">workspaces</span>.<span class="ruby-identifier">empty?</span>
232
- <span class="ruby-comment"># TODO: Handle workspace file extension usurping logic here.</span>
233
-
234
- <span class="ruby-identifier">new_source_file</span> = <span class="ruby-identifier">workspaces</span>.<span class="ruby-identifier">first</span>
235
- <span class="ruby-identifier">new_handler</span> = <span class="ruby-constant">NetLinx</span><span class="ruby-operator">::</span><span class="ruby-constant">Compile</span><span class="ruby-operator">::</span><span class="ruby-constant">ExtensionDiscovery</span>.<span class="ruby-identifier">get_handler</span> <span class="ruby-identifier">new_source_file</span>
236
- <span class="ruby-identifier">new_handler_class</span> = <span class="ruby-identifier">new_handler</span>.<span class="ruby-identifier">handler_class</span>.<span class="ruby-identifier">new</span> <span class="ruby-identifier">file</span><span class="ruby-operator">:</span> <span class="ruby-constant">File</span>.<span class="ruby-identifier">expand_path</span>(<span class="ruby-identifier">new_source_file</span>)
343
+ <span class='kw'>unless</span> <span class='id identifier rubyid_workspaces'>workspaces</span><span class='period'>.</span><span class='id identifier rubyid_empty?'>empty?</span>
344
+ <span class='comment'># TODO: Handle workspace file extension usurping logic here.
345
+ </span>
346
+ <span class='id identifier rubyid_new_source_file'>new_source_file</span> <span class='op'>=</span> <span class='id identifier rubyid_workspaces'>workspaces</span><span class='period'>.</span><span class='id identifier rubyid_first'>first</span>
347
+ <span class='id identifier rubyid_new_handler'>new_handler</span> <span class='op'>=</span> <span class='const'>NetLinx</span><span class='op'>::</span><span class='const'>Compile</span><span class='op'>::</span><span class='const'>ExtensionDiscovery</span><span class='period'>.</span><span class='id identifier rubyid_get_handler'>get_handler</span> <span class='id identifier rubyid_new_source_file'>new_source_file</span>
348
+ <span class='id identifier rubyid_new_handler_class'>new_handler_class</span> <span class='op'>=</span> <span class='id identifier rubyid_new_handler'>new_handler</span><span class='period'>.</span><span class='id identifier rubyid_handler_class'>handler_class</span><span class='period'>.</span><span class='id identifier rubyid_new'>new</span> \
349
+ <span class='label'>file:</span> <span class='const'>File</span><span class='period'>.</span><span class='id identifier rubyid_expand_path'>expand_path</span><span class='lparen'>(</span><span class='id identifier rubyid_new_source_file'>new_source_file</span><span class='rparen'>)</span>
237
350
 
238
- <span class="ruby-comment"># If supported by the new_handler, make sure the source_file is</span>
239
- <span class="ruby-comment"># included in the workspace before overwriting the old handler.</span>
240
- <span class="ruby-identifier">overwrite_old_handler</span> = <span class="ruby-keyword">false</span>
351
+ <span class='comment'># If supported by the new_handler, make sure the source_file is
352
+ </span> <span class='comment'># included in the workspace before overwriting the old handler.
353
+ </span> <span class='id identifier rubyid_overwrite_old_handler'>overwrite_old_handler</span> <span class='op'>=</span> <span class='kw'>false</span>
241
354
 
242
- <span class="ruby-keyword">if</span> <span class="ruby-identifier">new_handler_class</span>.<span class="ruby-identifier">respond_to?</span> <span class="ruby-value">:include?</span>
243
- <span class="ruby-identifier">overwrite_old_handler</span> = <span class="ruby-keyword">true</span> <span class="ruby-keyword">if</span> <span class="ruby-identifier">new_handler_class</span>.<span class="ruby-identifier">include?</span> <span class="ruby-identifier">source_file</span>
244
- <span class="ruby-keyword">else</span>
245
- <span class="ruby-comment"># Workspace doesn&#39;t expose an interface to see if it</span>
246
- <span class="ruby-comment"># includes the source file, so assume it does.</span>
247
- <span class="ruby-comment"># Otherwise the user could have compiled without the</span>
248
- <span class="ruby-comment"># workspace flag.</span>
249
- <span class="ruby-identifier">overwrite_old_handler</span> = <span class="ruby-keyword">true</span>
250
- <span class="ruby-keyword">end</span>
355
+ <span class='kw'>if</span> <span class='id identifier rubyid_new_handler_class'>new_handler_class</span><span class='period'>.</span><span class='id identifier rubyid_respond_to?'>respond_to?</span> <span class='symbol'>:include?</span>
356
+ <span class='id identifier rubyid_overwrite_old_handler'>overwrite_old_handler</span> <span class='op'>=</span> <span class='kw'>true</span> <span class='kw'>if</span> <span class='id identifier rubyid_new_handler_class'>new_handler_class</span><span class='period'>.</span><span class='id identifier rubyid_include?'>include?</span> <span class='id identifier rubyid_source_file'>source_file</span>
357
+ <span class='kw'>else</span>
358
+ <span class='comment'># Workspace doesn&#39;t expose an interface to see if it
359
+ </span> <span class='comment'># includes the source file, so assume it does.
360
+ </span> <span class='comment'># Otherwise the user could have compiled without the
361
+ </span> <span class='comment'># workspace flag.
362
+ </span> <span class='id identifier rubyid_overwrite_old_handler'>overwrite_old_handler</span> <span class='op'>=</span> <span class='kw'>true</span>
363
+ <span class='kw'>end</span>
251
364
 
252
- <span class="ruby-keyword">if</span> <span class="ruby-identifier">overwrite_old_handler</span>
253
- <span class="ruby-identifier">source_file</span> = <span class="ruby-identifier">new_source_file</span>
254
- <span class="ruby-identifier">handler</span> = <span class="ruby-identifier">new_handler</span>
255
- <span class="ruby-identifier">handler_class</span> = <span class="ruby-identifier">new_handler_class</span>
256
- <span class="ruby-keyword">break</span>
257
- <span class="ruby-keyword">end</span>
258
- <span class="ruby-keyword">end</span>
365
+ <span class='kw'>if</span> <span class='id identifier rubyid_overwrite_old_handler'>overwrite_old_handler</span>
366
+ <span class='id identifier rubyid_source_file'>source_file</span> <span class='op'>=</span> <span class='id identifier rubyid_new_source_file'>new_source_file</span>
367
+ <span class='id identifier rubyid_handler'>handler</span> <span class='op'>=</span> <span class='id identifier rubyid_new_handler'>new_handler</span>
368
+ <span class='id identifier rubyid_handler_class'>handler_class</span> <span class='op'>=</span> <span class='id identifier rubyid_new_handler_class'>new_handler_class</span>
369
+ <span class='kw'>break</span>
370
+ <span class='kw'>end</span>
371
+ <span class='kw'>end</span>
259
372
 
260
- <span class="ruby-identifier">dir</span> = <span class="ruby-constant">File</span>.<span class="ruby-identifier">expand_path</span> <span class="ruby-string">&#39;..&#39;</span>, <span class="ruby-identifier">dir</span>
261
- <span class="ruby-keyword">end</span>
262
- <span class="ruby-keyword">end</span>
263
-
264
- <span class="ruby-comment"># Instantiate the class that can handle compiling of the file.</span>
265
- <span class="ruby-identifier">handler_class</span> = <span class="ruby-identifier">handler</span>.<span class="ruby-identifier">handler_class</span>.<span class="ruby-identifier">new</span> <span class="ruby-identifier">file</span><span class="ruby-operator">:</span> <span class="ruby-constant">File</span>.<span class="ruby-identifier">expand_path</span>(<span class="ruby-identifier">source_file</span>)
266
-
267
- <span class="ruby-identifier">result</span> = <span class="ruby-identifier">handler_class</span>.<span class="ruby-identifier">compile</span>
268
-
269
- <span class="ruby-identifier">result</span>.<span class="ruby-identifier">map</span> {<span class="ruby-operator">|</span><span class="ruby-identifier">r</span><span class="ruby-operator">|</span> <span class="ruby-identifier">r</span>.<span class="ruby-identifier">to_s</span>}
270
- <span class="ruby-keyword">end</span></pre>
271
- </div><!-- run-source -->
272
-
273
- </div>
274
-
275
-
276
-
277
-
278
- </div><!-- run-method -->
279
-
280
-
281
- </section><!-- public-class-method-details -->
282
-
283
- </section><!-- 5Buntitled-5D -->
284
-
285
- </div><!-- documentation -->
286
-
287
-
288
- <footer id="validator-badges">
289
- <p><a href="http://validator.w3.org/check/referer">[Validate]</a>
290
- <p>Generated by <a href="https://github.com/rdoc/rdoc">RDoc</a> 4.0.1.
291
- <p>Generated with the <a href="http://deveiate.org/projects/Darkfish-Rdoc/">Darkfish Rdoc Generator</a> 3.
292
- </footer>
293
-
373
+ <span class='id identifier rubyid_dir'>dir</span> <span class='op'>=</span> <span class='const'>File</span><span class='period'>.</span><span class='id identifier rubyid_expand_path'>expand_path</span> <span class='tstring'><span class='tstring_beg'>&#39;</span><span class='tstring_content'>..</span><span class='tstring_end'>&#39;</span></span><span class='comma'>,</span> <span class='id identifier rubyid_dir'>dir</span>
374
+ <span class='kw'>end</span>
375
+ <span class='kw'>end</span>
376
+
377
+ <span class='comment'># Instantiate the class that can handle compiling of the file.
378
+ </span> <span class='id identifier rubyid_handler_class'>handler_class</span> <span class='op'>=</span> <span class='id identifier rubyid_handler'>handler</span><span class='period'>.</span><span class='id identifier rubyid_handler_class'>handler_class</span><span class='period'>.</span><span class='id identifier rubyid_new'>new</span> \
379
+ <span class='label'>file:</span> <span class='const'>File</span><span class='period'>.</span><span class='id identifier rubyid_expand_path'>expand_path</span><span class='lparen'>(</span><span class='id identifier rubyid_source_file'>source_file</span><span class='rparen'>)</span>
380
+
381
+ <span class='id identifier rubyid_result'>result</span> <span class='op'>=</span> <span class='id identifier rubyid_handler_class'>handler_class</span><span class='period'>.</span><span class='id identifier rubyid_compile'>compile</span>
382
+
383
+ <span class='id identifier rubyid_result'>result</span><span class='period'>.</span><span class='id identifier rubyid_map'>map</span> <span class='lbrace'>{</span><span class='op'>|</span><span class='id identifier rubyid_r'>r</span><span class='op'>|</span> <span class='id identifier rubyid_r'>r</span><span class='period'>.</span><span class='id identifier rubyid_to_s'>to_s</span><span class='rbrace'>}</span>
384
+ <span class='kw'>end</span></pre>
385
+ </td>
386
+ </tr>
387
+ </table>
388
+ </div>
389
+
390
+ </div>
391
+
392
+ </div>
393
+
394
+ <div id="footer">
395
+ Generated on Mon Jan 26 15:35:28 2015 by
396
+ <a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
397
+ 0.8.7.6 (ruby-2.1.5).
398
+ </div>
399
+
400
+ </body>
401
+ </html>