netlinx-compile 1.0.0 → 2.0.0

Sign up to get free protection for your applications and to get access to all the features.
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,324 +1,482 @@
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::ExtensionDiscovery - 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
-
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::ExtensionDiscovery
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/ExtensionDiscovery.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 (E)</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">ExtensionDiscovery</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::ExtensionDiscovery
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::ExtensionDiscovery</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/extension_discovery.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>Discovers and auto-requires add-on Ruby libraries for netlinx-compile.</p>
106
+
107
+
108
+ </div>
109
+ </div>
110
+ <div class="tags">
111
+
112
+
113
+ </div>
114
+
115
+
116
+
117
+ <h2>Class Attribute Summary <small>(<a href="#" class="summary_toggle">collapse</a>)</small></h2>
118
+ <ul class="summary">
119
+
120
+ <li class="public ">
121
+ <span class="summary_signature">
122
+
123
+ <a href="#handlers-class_method" title="handlers (class method)">+ (Object) <strong>handlers</strong> </a>
124
+
125
+
126
+
127
+ </span>
128
+
129
+
130
+
131
+
132
+
133
+
134
+
135
+
136
+
137
+
138
+
139
+
140
+ <span class="summary_desc"><div class='inline'>
141
+ <p>An array of ExtensionHandlers installed on the system.</p>
142
+ </div></span>
143
+
144
+ </li>
145
+
146
+
147
+ </ul>
148
+
149
+
150
+
151
+
152
+
153
+ <h2>
154
+ Class Method Summary
155
+ <small>(<a href="#" class="summary_toggle">collapse</a>)</small>
156
+ </h2>
157
+
158
+ <ul class="summary">
159
+
160
+ <li class="public ">
161
+ <span class="summary_signature">
162
+
163
+ <a href="#discover-class_method" title="discover (class method)">+ (Object) <strong>discover</strong> </a>
164
+
165
+
166
+
167
+ </span>
168
+
169
+
170
+
171
+
172
+
173
+
174
+
175
+
176
+
177
+ <span class="summary_desc"><div class='inline'>
178
+ <p>Searches for gems with &#39;netlinx-compile&#39; as a dependency.</p>
179
+ </div></span>
180
+
181
+ </li>
182
+
183
+
184
+ <li class="public ">
185
+ <span class="summary_signature">
186
+
187
+ <a href="#get_handler-class_method" title="get_handler (class method)">+ (Object) <strong>get_handler</strong>(filename) </a>
188
+
189
+
190
+
191
+ </span>
192
+
193
+
194
+
195
+
196
+
197
+
198
+
199
+
200
+
201
+ <span class="summary_desc"><div class='inline'>
202
+ <p>Get an ExtensionHandler for a given file or extension.</p>
203
+ </div></span>
204
+
205
+ </li>
206
+
207
+
208
+ <li class="public ">
209
+ <span class="summary_signature">
210
+
211
+ <a href="#workspace_extensions-class_method" title="workspace_extensions (class method)">+ (Object) <strong>workspace_extensions</strong> </a>
212
+
213
+
214
+
215
+ </span>
216
+
217
+
218
+
219
+
220
+
221
+
222
+
223
+
224
+
225
+ <span class="summary_desc"><div class='inline'>
226
+ <p>Returns an array of workspace file extensions.</p>
227
+ </div></span>
228
+
229
+ </li>
230
+
231
+
232
+ </ul>
233
+
234
+
235
+
236
+ <div id="class_attr_details" class="attr_details">
237
+ <h2>Class Attribute Details</h2>
238
+
239
+
240
+ <span id="handlers=-class_method"></span>
241
+ <div class="method_details first">
242
+ <h3 class="signature first" id="handlers-class_method">
243
+
244
+ + (<tt>Object</tt>) <strong>handlers</strong>
245
+
246
+
247
+
248
+
249
+
250
+ </h3><div class="docstring">
251
+ <div class="discussion">
252
+
253
+ <p>An array of ExtensionHandlers installed on the system. #discover must be
254
+ run before this array is populated.</p>
255
+
256
+
257
+ </div>
258
+ </div>
259
+ <div class="tags">
260
+
261
+
262
+ </div><table class="source_code">
263
+ <tr>
264
+ <td>
265
+ <pre class="lines">
266
+
267
+
268
+ 10
269
+ 11
270
+ 12</pre>
271
+ </td>
272
+ <td>
273
+ <pre class="code"><span class="info file"># File 'lib/netlinx/compile/extension_discovery.rb', line 10</span>
274
+
275
+ <span class='kw'>def</span> <span class='id identifier rubyid_handlers'>handlers</span>
276
+ <span class='ivar'>@handlers</span>
277
+ <span class='kw'>end</span></pre>
278
+ </td>
279
+ </tr>
280
+ </table>
281
+ </div>
282
+
283
+ </div>
284
+
285
+
286
+ <div id="class_method_details" class="method_details_list">
287
+ <h2>Class Method Details</h2>
288
+
289
+
290
+ <div class="method_details first">
291
+ <h3 class="signature first" id="discover-class_method">
292
+
293
+ + (<tt>Object</tt>) <strong>discover</strong>
294
+
295
+
296
+
297
+
298
+
299
+ </h3><div class="docstring">
300
+ <div class="discussion">
301
+
302
+ <p>Searches for gems with &#39;netlinx-compile&#39; as a dependency. The
303
+ &#39;lib/netlinx/compile/extension/*&#39; path is checked for compiler
304
+ extensions.</p>
305
+
306
+
307
+ </div>
308
+ </div>
309
+ <div class="tags">
310
+
311
+
312
+ </div><table class="source_code">
313
+ <tr>
314
+ <td>
315
+ <pre class="lines">
316
+
317
+
318
+ 17
319
+ 18
320
+ 19
321
+ 20
322
+ 21
323
+ 22
324
+ 23
325
+ 24
326
+ 25
327
+ 26
328
+ 27
329
+ 28
330
+ 29
331
+ 30
332
+ 31
333
+ 32
334
+ 33
335
+ 34
336
+ 35
337
+ 36
338
+ 37
339
+ 38
340
+ 39
341
+ 40
342
+ 41
343
+ 42
344
+ 43
345
+ 44</pre>
346
+ </td>
347
+ <td>
348
+ <pre class="code"><span class="info file"># File 'lib/netlinx/compile/extension_discovery.rb', line 17</span>
349
+
350
+ <span class='kw'>def</span> <span class='id identifier rubyid_discover'>discover</span>
351
+ <span class='comment'># Require extensions built into netlinx-compile.
352
+ </span> <span class='id identifier rubyid_nc_gem'>nc_gem</span> <span class='op'>=</span> <span class='const'>Gem</span><span class='op'>::</span><span class='const'>Specification</span><span class='period'>.</span><span class='id identifier rubyid_find_by_name'>find_by_name</span> <span class='tstring'><span class='tstring_beg'>&#39;</span><span class='tstring_content'>netlinx-compile</span><span class='tstring_end'>&#39;</span></span>
353
+ <span class='id identifier rubyid_nc_gem_path'>nc_gem_path</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'>lib/netlinx/compile/extension</span><span class='tstring_end'>&#39;</span></span><span class='comma'>,</span> <span class='id identifier rubyid_nc_gem'>nc_gem</span><span class='period'>.</span><span class='id identifier rubyid_gem_dir'>gem_dir</span>
354
+ <span class='id identifier rubyid_nc_gem_files'>nc_gem_files</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_nc_gem_path'>nc_gem_path</span><span class='embexpr_end'>}</span><span class='tstring_content'>/*.rb</span><span class='tstring_end'>&quot;</span></span><span class='rbracket'>]</span>
355
+ <span class='id identifier rubyid_nc_gem_files'>nc_gem_files</span><span class='period'>.</span><span class='id identifier rubyid_each'>each</span> <span class='lbrace'>{</span><span class='op'>|</span><span class='id identifier rubyid_file'>file</span><span class='op'>|</span> <span class='id identifier rubyid_require'>require</span> <span class='id identifier rubyid_file'>file</span><span class='rbrace'>}</span>
46
356
 
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/extension_discovery.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>
357
+ <span class='comment'># Find gems with a dependency on &#39;netlinx-compile&#39;.
358
+ </span> <span class='id identifier rubyid_gems'>gems</span> <span class='op'>=</span> <span class='const'>Gem</span><span class='op'>::</span><span class='const'>Specification</span><span class='period'>.</span><span class='id identifier rubyid_each'>each</span><span class='period'>
359
+ </span><span class='id identifier rubyid_ .select'> .select</span><span class='lbrace'>{</span><span class='op'>|</span><span class='id identifier rubyid_gem'>gem</span><span class='op'>|</span> <span class='id identifier rubyid_gem'>gem</span><span class='period'>.</span><span class='id identifier rubyid_dependencies'>dependencies</span><span class='period'>
360
+ </span><span class='id identifier rubyid_ .select'> .select</span><span class='lbrace'>{</span><span class='op'>|</span><span class='id identifier rubyid_dependency'>dependency</span><span class='op'>|</span> <span class='id identifier rubyid_dependency'>dependency</span><span class='period'>.</span><span class='id identifier rubyid_name'>name</span> <span class='op'>==</span> <span class='tstring'><span class='tstring_beg'>&#39;</span><span class='tstring_content'>netlinx-compile</span><span class='tstring_end'>&#39;</span></span><span class='rbrace'>}</span><span class='period'>
361
+ </span><span class='id identifier rubyid_ .empty?'> .empty?</span> <span class='op'>==</span> <span class='kw'>false</span>
362
+ <span class='rbrace'>}</span>
63
363
 
64
- <p class="link">Object
364
+ <span class='comment'># Load any Ruby files in their lib/netlinx/compile/extension paths.
365
+ </span> <span class='id identifier rubyid_gems'>gems</span><span class='period'>.</span><span class='id identifier rubyid_each'>each</span> <span class='kw'>do</span> <span class='op'>|</span><span class='id identifier rubyid_gem'>gem</span><span class='op'>|</span>
366
+ <span class='id identifier rubyid_extension_path'>extension_path</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'>lib/netlinx/compile/extension</span><span class='tstring_end'>&#39;</span></span><span class='comma'>,</span> <span class='id identifier rubyid_gem'>gem</span><span class='period'>.</span><span class='id identifier rubyid_gem_dir'>gem_dir</span>
367
+ <span class='id identifier rubyid_files'>files</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_extension_path'>extension_path</span><span class='embexpr_end'>}</span><span class='tstring_content'>/*.rb</span><span class='tstring_end'>&quot;</span></span><span class='rbracket'>]</span>
368
+ <span class='id identifier rubyid_files'>files</span><span class='period'>.</span><span class='id identifier rubyid_each'>each</span> <span class='lbrace'>{</span><span class='op'>|</span><span class='id identifier rubyid_file'>file</span><span class='op'>|</span> <span class='id identifier rubyid_require'>require</span> <span class='id identifier rubyid_file'>file</span><span class='rbrace'>}</span>
369
+ <span class='kw'>end</span>
65
370
 
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-discover">::discover</a>
77
-
78
- <li ><a href="#method-c-get_handler">::get_handler</a>
79
-
80
- <li ><a href="#method-c-workspace_extensions">::workspace_extensions</a>
81
-
82
- </ul>
83
- </nav>
84
-
85
- </div>
86
-
87
- <div id="project-metadata">
88
-
89
- <nav id="classindex-section" class="section project-section">
90
- <h3 class="section-header">Class and Module Index</h3>
91
-
92
- <ul class="link-list">
93
-
94
- <li><a href="../../NetLinx.html">NetLinx</a>
95
-
96
- <li><a href="../../NetLinx/Compile.html">NetLinx::Compile</a>
97
-
98
- <li><a href="../../NetLinx/Compile/Extension.html">NetLinx::Compile::Extension</a>
99
-
100
- <li><a href="../../NetLinx/Compile/Extension/AXS.html">NetLinx::Compile::Extension::AXS</a>
101
-
102
- <li><a href="../../NetLinx/Compile/ExtensionDiscovery.html">NetLinx::Compile::ExtensionDiscovery</a>
103
-
104
- <li><a href="../../NetLinx/Compile/ExtensionHandler.html">NetLinx::Compile::ExtensionHandler</a>
105
-
106
- <li><a href="../../NetLinx/Compile/Script.html">NetLinx::Compile::Script</a>
107
-
108
- <li><a href="../../NetLinx/Compiler.html">NetLinx::Compiler</a>
109
-
110
- <li><a href="../../NetLinx/CompilerResult.html">NetLinx::CompilerResult</a>
111
-
112
- <li><a href="../../NetLinx/NoCompilerError.html">NetLinx::NoCompilerError</a>
113
-
114
- <li><a href="../../NetLinx/SourceFile.html">NetLinx::SourceFile</a>
115
-
116
- <li><a href="../../Test.html">Test</a>
117
-
118
- <li><a href="../../Test/NetLinx.html">Test::NetLinx</a>
119
-
120
- <li><a href="../../Test/NetLinx/Compilable.html">Test::NetLinx::Compilable</a>
121
-
122
- <li><a href="../../Test/NetLinx/Compile.html">Test::NetLinx::Compile</a>
123
-
124
- <li><a href="../../Test/NetLinx/Compile/Discoverable.html">Test::NetLinx::Compile::Discoverable</a>
125
-
126
- <li><a href="../../Test/NetLinx/Compile/Invokable.html">Test::NetLinx::Compile::Invokable</a>
127
-
128
- </ul>
129
- </nav>
130
-
131
- </div>
132
- </nav>
133
-
134
- <div id="documentation">
135
- <h1 class="class">class NetLinx::Compile::ExtensionDiscovery</h1>
136
-
137
- <div id="description" class="description">
138
-
139
- <p>Discovers and auto-requires add-on Ruby libraries for netlinx-compile.</p>
140
-
141
- </div><!-- description -->
142
-
143
-
144
-
145
-
146
- <section id="5Buntitled-5D" class="documentation-section">
147
-
148
-
149
-
150
-
151
-
152
-
153
-
154
- <!-- Attributes -->
155
- <section id="attribute-method-details" class="method-section section">
156
- <h3 class="section-header">Attributes</h3>
157
-
158
-
159
- <div id="attribute-c-handlers" class="method-detail">
160
- <div class="method-heading attribute-method-heading">
161
- <span class="method-name">handlers</span><span
162
- class="attribute-access-type">[RW]</span>
163
- </div>
164
-
165
- <div class="method-description">
166
-
167
- <p>An array of ExtensionHandlers installed on the system. discover must be run
168
- before this array is populated.</p>
169
-
170
- </div>
171
- </div>
172
-
173
- </section><!-- attribute-method-details -->
174
-
175
-
176
- <!-- Methods -->
177
-
178
- <section id="public-class-5Buntitled-5D-method-details" class="method-section section">
179
- <h3 class="section-header">Public Class Methods</h3>
180
-
181
-
182
- <div id="method-c-discover" class="method-detail ">
183
-
184
- <div class="method-heading">
185
- <span class="method-name">discover</span><span
186
- class="method-args">()</span>
187
-
188
- <span class="method-click-advice">click to toggle source</span>
189
-
190
- </div>
191
-
192
-
193
- <div class="method-description">
194
-
195
- <p>Searches for gems with &#39;netlinx-compile&#39; as a dependency. The
196
- &#39;lib/netlinx/compile/extension/*&#39; path is checked for compiler
197
- extensions.</p>
198
-
199
-
200
-
201
-
202
- <div class="method-source-code" id="discover-source">
203
- <pre><span class="ruby-comment"># File lib/netlinx/compile/extension_discovery.rb, line 17</span>
204
- <span class="ruby-keyword">def</span> <span class="ruby-identifier">discover</span>
205
- <span class="ruby-comment"># Require extensions built into netlinx-compile.</span>
206
- <span class="ruby-identifier">nc_gem</span> = <span class="ruby-constant">Gem</span><span class="ruby-operator">::</span><span class="ruby-constant">Specification</span>.<span class="ruby-identifier">find_by_name</span> <span class="ruby-string">&#39;netlinx-compile&#39;</span>
207
- <span class="ruby-identifier">nc_gem_path</span> = <span class="ruby-constant">File</span>.<span class="ruby-identifier">expand_path</span> <span class="ruby-string">&#39;lib/netlinx/compile/extension&#39;</span>, <span class="ruby-identifier">nc_gem</span>.<span class="ruby-identifier">gem_dir</span>
208
- <span class="ruby-identifier">nc_gem_files</span> = <span class="ruby-constant">Dir</span>[<span class="ruby-node">&quot;#{nc_gem_path}/*.rb&quot;</span>]
209
- <span class="ruby-identifier">nc_gem_files</span>.<span class="ruby-identifier">each</span> {<span class="ruby-operator">|</span><span class="ruby-identifier">file</span><span class="ruby-operator">|</span> <span class="ruby-identifier">require</span> <span class="ruby-identifier">file</span>}
210
-
211
- <span class="ruby-comment"># Find gems with a dependency on &#39;netlinx-compile&#39;.</span>
212
- <span class="ruby-identifier">gems</span> = <span class="ruby-constant">Gem</span><span class="ruby-operator">::</span><span class="ruby-constant">Specification</span>.<span class="ruby-identifier">each</span>
213
- .<span class="ruby-identifier">select</span>{<span class="ruby-operator">|</span><span class="ruby-identifier">gem</span><span class="ruby-operator">|</span> <span class="ruby-identifier">gem</span>.<span class="ruby-identifier">dependencies</span>
214
- .<span class="ruby-identifier">select</span>{<span class="ruby-operator">|</span><span class="ruby-identifier">dependency</span><span class="ruby-operator">|</span> <span class="ruby-identifier">dependency</span>.<span class="ruby-identifier">name</span> <span class="ruby-operator">==</span> <span class="ruby-string">&#39;netlinx-compile&#39;</span>}
215
- .<span class="ruby-identifier">empty?</span> <span class="ruby-operator">==</span> <span class="ruby-keyword">false</span>
216
- }
217
-
218
- <span class="ruby-comment"># Load any Ruby files in their lib/netlinx/compile/extension paths.</span>
219
- <span class="ruby-identifier">gems</span>.<span class="ruby-identifier">each</span> <span class="ruby-keyword">do</span> <span class="ruby-operator">|</span><span class="ruby-identifier">gem</span><span class="ruby-operator">|</span>
220
- <span class="ruby-identifier">extension_path</span> = <span class="ruby-constant">File</span>.<span class="ruby-identifier">expand_path</span> <span class="ruby-string">&#39;lib/netlinx/compile/extension&#39;</span>, <span class="ruby-identifier">gem</span>.<span class="ruby-identifier">gem_dir</span>
221
- <span class="ruby-identifier">files</span> = <span class="ruby-constant">Dir</span>[<span class="ruby-node">&quot;#{extension_path}/*.rb&quot;</span>]
222
- <span class="ruby-identifier">files</span>.<span class="ruby-identifier">each</span> {<span class="ruby-operator">|</span><span class="ruby-identifier">file</span><span class="ruby-operator">|</span> <span class="ruby-identifier">require</span> <span class="ruby-identifier">file</span>}
223
- <span class="ruby-keyword">end</span>
224
-
225
- <span class="ruby-comment"># Register ExtensionHandler objects.</span>
226
- <span class="ruby-ivar">@handlers</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">Extension</span>.<span class="ruby-identifier">constants</span>
227
- .<span class="ruby-identifier">map</span>{<span class="ruby-operator">|</span><span class="ruby-identifier">c</span><span class="ruby-operator">|</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">Extension</span>.<span class="ruby-identifier">const_get</span> <span class="ruby-identifier">c</span>}
228
- .<span class="ruby-identifier">select</span>{<span class="ruby-operator">|</span><span class="ruby-identifier">c</span><span class="ruby-operator">|</span> <span class="ruby-identifier">c</span>.<span class="ruby-identifier">is_a?</span> <span class="ruby-constant">Class</span>}
229
- .<span class="ruby-identifier">map</span>{<span class="ruby-operator">|</span><span class="ruby-identifier">c</span><span class="ruby-operator">|</span> <span class="ruby-identifier">c</span>.<span class="ruby-identifier">get_handler</span> <span class="ruby-keyword">if</span> <span class="ruby-identifier">c</span>.<span class="ruby-identifier">respond_to?</span> <span class="ruby-value">:get_handler</span>}
230
- .<span class="ruby-identifier">select</span>{<span class="ruby-operator">|</span><span class="ruby-identifier">c</span><span class="ruby-operator">|</span> <span class="ruby-keyword">not</span> <span class="ruby-identifier">c</span>.<span class="ruby-identifier">nil?</span>}
231
- <span class="ruby-keyword">end</span></pre>
232
- </div><!-- discover-source -->
233
-
234
- </div>
235
-
236
-
237
-
238
-
239
- </div><!-- discover-method -->
240
-
241
-
242
- <div id="method-c-get_handler" class="method-detail ">
243
-
244
- <div class="method-heading">
245
- <span class="method-name">get_handler</span><span
246
- class="method-args">(filename)</span>
247
-
248
- <span class="method-click-advice">click to toggle source</span>
249
-
250
- </div>
251
-
252
-
253
- <div class="method-description">
254
-
255
- <p>Get an <a href="ExtensionHandler.html">ExtensionHandler</a> for a given
256
- file or extension.</p>
257
-
258
-
259
-
260
-
261
- <div class="method-source-code" id="get_handler-source">
262
- <pre><span class="ruby-comment"># File lib/netlinx/compile/extension_discovery.rb, line 55</span>
263
- <span class="ruby-keyword">def</span> <span class="ruby-identifier">get_handler</span>(<span class="ruby-identifier">filename</span>)
264
- <span class="ruby-ivar">@handlers</span>.<span class="ruby-identifier">select</span>{<span class="ruby-operator">|</span><span class="ruby-identifier">h</span><span class="ruby-operator">|</span> <span class="ruby-identifier">h</span>.<span class="ruby-identifier">include?</span> <span class="ruby-identifier">filename</span>}.<span class="ruby-identifier">first</span>
265
- <span class="ruby-keyword">end</span></pre>
266
- </div><!-- get_handler-source -->
267
-
268
- </div>
269
-
270
-
271
-
272
-
273
- </div><!-- get_handler-method -->
274
-
275
-
276
- <div id="method-c-workspace_extensions" class="method-detail ">
277
-
278
- <div class="method-heading">
279
- <span class="method-name">workspace_extensions</span><span
280
- class="method-args">()</span>
281
-
282
- <span class="method-click-advice">click to toggle source</span>
283
-
284
- </div>
285
-
286
-
287
- <div class="method-description">
288
-
289
- <p>Returns an array of workspace file extensions.</p>
290
-
291
-
292
-
293
-
294
- <div class="method-source-code" id="workspace_extensions-source">
295
- <pre><span class="ruby-comment"># File lib/netlinx/compile/extension_discovery.rb, line 47</span>
296
- <span class="ruby-keyword">def</span> <span class="ruby-identifier">workspace_extensions</span>
297
- <span class="ruby-ivar">@handlers</span>
298
- .<span class="ruby-identifier">select</span>{<span class="ruby-operator">|</span><span class="ruby-identifier">h</span><span class="ruby-operator">|</span> <span class="ruby-identifier">h</span>.<span class="ruby-identifier">is_a_workspace?</span>}
299
- .<span class="ruby-identifier">map</span>{<span class="ruby-operator">|</span><span class="ruby-identifier">h</span><span class="ruby-operator">|</span> <span class="ruby-identifier">h</span>.<span class="ruby-identifier">extensions</span>}
300
- .<span class="ruby-identifier">flatten</span>
301
- <span class="ruby-keyword">end</span></pre>
302
- </div><!-- workspace_extensions-source -->
303
-
304
- </div>
305
-
306
-
307
-
308
-
309
- </div><!-- workspace_extensions-method -->
310
-
311
-
312
- </section><!-- public-class-method-details -->
313
-
314
- </section><!-- 5Buntitled-5D -->
315
-
316
- </div><!-- documentation -->
317
-
318
-
319
- <footer id="validator-badges">
320
- <p><a href="http://validator.w3.org/check/referer">[Validate]</a>
321
- <p>Generated by <a href="https://github.com/rdoc/rdoc">RDoc</a> 4.0.1.
322
- <p>Generated with the <a href="http://deveiate.org/projects/Darkfish-Rdoc/">Darkfish Rdoc Generator</a> 3.
323
- </footer>
324
-
371
+ <span class='comment'># Register ExtensionHandler objects.
372
+ </span> <span class='ivar'>@handlers</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'>Extension</span><span class='period'>.</span><span class='id identifier rubyid_constants'>constants</span><span class='period'>
373
+ </span><span class='id identifier rubyid_ .map'> .map</span><span class='lbrace'>{</span><span class='op'>|</span><span class='id identifier rubyid_c'>c</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'>Extension</span><span class='period'>.</span><span class='id identifier rubyid_const_get'>const_get</span> <span class='id identifier rubyid_c'>c</span><span class='rbrace'>}</span><span class='period'>
374
+ </span><span class='id identifier rubyid_ .select'> .select</span><span class='lbrace'>{</span><span class='op'>|</span><span class='id identifier rubyid_c'>c</span><span class='op'>|</span> <span class='id identifier rubyid_c'>c</span><span class='period'>.</span><span class='id identifier rubyid_is_a?'>is_a?</span> <span class='const'>Class</span><span class='rbrace'>}</span><span class='period'>
375
+ </span><span class='id identifier rubyid_ .map'> .map</span><span class='lbrace'>{</span><span class='op'>|</span><span class='id identifier rubyid_c'>c</span><span class='op'>|</span> <span class='id identifier rubyid_c'>c</span><span class='period'>.</span><span class='id identifier rubyid_get_handler'>get_handler</span> <span class='kw'>if</span> <span class='id identifier rubyid_c'>c</span><span class='period'>.</span><span class='id identifier rubyid_respond_to?'>respond_to?</span> <span class='symbol'>:get_handler</span><span class='rbrace'>}</span><span class='period'>
376
+ </span><span class='id identifier rubyid_ .select'> .select</span><span class='lbrace'>{</span><span class='op'>|</span><span class='id identifier rubyid_c'>c</span><span class='op'>|</span> <span class='kw'>not</span> <span class='id identifier rubyid_c'>c</span><span class='period'>.</span><span class='id identifier rubyid_nil?'>nil?</span><span class='rbrace'>}</span>
377
+ <span class='kw'>end</span></pre>
378
+ </td>
379
+ </tr>
380
+ </table>
381
+ </div>
382
+
383
+ <div class="method_details ">
384
+ <h3 class="signature " id="get_handler-class_method">
385
+
386
+ + (<tt>Object</tt>) <strong>get_handler</strong>(filename)
387
+
388
+
389
+
390
+
391
+
392
+ </h3><div class="docstring">
393
+ <div class="discussion">
394
+
395
+ <p>Get an ExtensionHandler for a given file or extension.</p>
396
+
397
+
398
+ </div>
399
+ </div>
400
+ <div class="tags">
401
+
402
+
403
+ </div><table class="source_code">
404
+ <tr>
405
+ <td>
406
+ <pre class="lines">
407
+
408
+
409
+ 55
410
+ 56
411
+ 57</pre>
412
+ </td>
413
+ <td>
414
+ <pre class="code"><span class="info file"># File 'lib/netlinx/compile/extension_discovery.rb', line 55</span>
415
+
416
+ <span class='kw'>def</span> <span class='id identifier rubyid_get_handler'>get_handler</span><span class='lparen'>(</span><span class='id identifier rubyid_filename'>filename</span><span class='rparen'>)</span>
417
+ <span class='ivar'>@handlers</span><span class='period'>.</span><span class='id identifier rubyid_select'>select</span><span class='lbrace'>{</span><span class='op'>|</span><span class='id identifier rubyid_h'>h</span><span class='op'>|</span> <span class='id identifier rubyid_h'>h</span><span class='period'>.</span><span class='id identifier rubyid_include?'>include?</span> <span class='id identifier rubyid_filename'>filename</span><span class='rbrace'>}</span><span class='period'>.</span><span class='id identifier rubyid_first'>first</span>
418
+ <span class='kw'>end</span></pre>
419
+ </td>
420
+ </tr>
421
+ </table>
422
+ </div>
423
+
424
+ <div class="method_details ">
425
+ <h3 class="signature " id="workspace_extensions-class_method">
426
+
427
+ + (<tt>Object</tt>) <strong>workspace_extensions</strong>
428
+
429
+
430
+
431
+
432
+
433
+ </h3><div class="docstring">
434
+ <div class="discussion">
435
+
436
+ <p>Returns an array of workspace file extensions.</p>
437
+
438
+
439
+ </div>
440
+ </div>
441
+ <div class="tags">
442
+
443
+
444
+ </div><table class="source_code">
445
+ <tr>
446
+ <td>
447
+ <pre class="lines">
448
+
449
+
450
+ 47
451
+ 48
452
+ 49
453
+ 50
454
+ 51
455
+ 52</pre>
456
+ </td>
457
+ <td>
458
+ <pre class="code"><span class="info file"># File 'lib/netlinx/compile/extension_discovery.rb', line 47</span>
459
+
460
+ <span class='kw'>def</span> <span class='id identifier rubyid_workspace_extensions'>workspace_extensions</span>
461
+ <span class='ivar'>@handlers</span><span class='period'>
462
+ </span><span class='id identifier rubyid_ .select'> .select</span><span class='lbrace'>{</span><span class='op'>|</span><span class='id identifier rubyid_h'>h</span><span class='op'>|</span> <span class='id identifier rubyid_h'>h</span><span class='period'>.</span><span class='id identifier rubyid_is_a_workspace?'>is_a_workspace?</span><span class='rbrace'>}</span><span class='period'>
463
+ </span><span class='id identifier rubyid_ .map'> .map</span><span class='lbrace'>{</span><span class='op'>|</span><span class='id identifier rubyid_h'>h</span><span class='op'>|</span> <span class='id identifier rubyid_h'>h</span><span class='period'>.</span><span class='id identifier rubyid_extensions'>extensions</span><span class='rbrace'>}</span><span class='period'>
464
+ </span><span class='id identifier rubyid_ .flatten'> .flatten</span>
465
+ <span class='kw'>end</span></pre>
466
+ </td>
467
+ </tr>
468
+ </table>
469
+ </div>
470
+
471
+ </div>
472
+
473
+ </div>
474
+
475
+ <div id="footer">
476
+ Generated on Mon Jan 26 15:35:29 2015 by
477
+ <a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
478
+ 0.8.7.6 (ruby-2.1.5).
479
+ </div>
480
+
481
+ </body>
482
+ </html>