netlinx-compile 1.0.0 → 3.1.2

Sign up to get free protection for your applications and to get access to all the features.
Files changed (84) hide show
  1. checksums.yaml +5 -5
  2. data/README.md +122 -0
  3. data/doc/NetLinx.html +130 -151
  4. data/doc/NetLinx/Compile.html +130 -148
  5. data/doc/NetLinx/Compile/Extension.html +128 -145
  6. data/doc/NetLinx/Compile/Extension/AXS.html +218 -154
  7. data/doc/NetLinx/Compile/ExtensionDiscovery.html +524 -321
  8. data/doc/NetLinx/Compile/ExtensionHandler.html +755 -396
  9. data/doc/NetLinx/Compile/Script.html +431 -282
  10. data/doc/NetLinx/Compiler.html +496 -285
  11. data/doc/NetLinx/CompilerResult.html +1250 -498
  12. data/doc/NetLinx/NoCompilerError.html +142 -155
  13. data/doc/NetLinx/Rake.html +115 -0
  14. data/doc/NetLinx/Rake/Compile.html +358 -0
  15. data/doc/NetLinx/SourceFile.html +702 -423
  16. data/doc/_index.html +234 -0
  17. data/doc/class_list.html +51 -0
  18. data/doc/css/common.css +1 -0
  19. data/doc/css/full_list.css +58 -0
  20. data/doc/css/style.css +496 -0
  21. data/doc/file.README.html +156 -0
  22. data/doc/file.license.html +70 -0
  23. data/doc/file_list.html +61 -0
  24. data/doc/frames.html +17 -0
  25. data/doc/index.html +156 -103
  26. data/doc/js/app.js +314 -0
  27. data/doc/js/full_list.js +216 -0
  28. data/doc/js/jquery.js +4 -18
  29. data/doc/method_list.html +339 -0
  30. data/doc/top-level-namespace.html +110 -0
  31. data/lib/netlinx-compile.rb +11 -1
  32. data/lib/netlinx/compile/extension_discovery.rb +4 -2
  33. data/lib/netlinx/compile/extension_handler.rb +23 -25
  34. data/lib/netlinx/compile/script.rb +4 -3
  35. data/lib/netlinx/compiler.rb +45 -21
  36. data/lib/netlinx/compiler_result.rb +16 -17
  37. data/lib/netlinx/rake/compile.rb +4 -0
  38. data/lib/netlinx/rake/compile/compile.rb +34 -0
  39. data/lib/netlinx/source_file.rb +20 -14
  40. data/lib/test/netlinx/compilable.rb +13 -48
  41. data/lib/test/netlinx/compile/discoverable.rb +3 -14
  42. data/lib/test/netlinx/compile/invokable.rb +3 -15
  43. data/license.txt +1 -1
  44. metadata +114 -74
  45. data/README.txt +0 -2
  46. data/doc/Test.html +0 -147
  47. data/doc/Test/NetLinx.html +0 -147
  48. data/doc/Test/NetLinx/Compilable.html +0 -148
  49. data/doc/Test/NetLinx/Compile.html +0 -146
  50. data/doc/Test/NetLinx/Compile/Discoverable.html +0 -148
  51. data/doc/Test/NetLinx/Compile/Invokable.html +0 -149
  52. data/doc/created.rid +0 -12
  53. data/doc/images/add.png +0 -0
  54. data/doc/images/arrow_up.png +0 -0
  55. data/doc/images/brick.png +0 -0
  56. data/doc/images/brick_link.png +0 -0
  57. data/doc/images/bug.png +0 -0
  58. data/doc/images/bullet_black.png +0 -0
  59. data/doc/images/bullet_toggle_minus.png +0 -0
  60. data/doc/images/bullet_toggle_plus.png +0 -0
  61. data/doc/images/date.png +0 -0
  62. data/doc/images/delete.png +0 -0
  63. data/doc/images/find.png +0 -0
  64. data/doc/images/loadingAnimation.gif +0 -0
  65. data/doc/images/macFFBgHack.png +0 -0
  66. data/doc/images/package.png +0 -0
  67. data/doc/images/page_green.png +0 -0
  68. data/doc/images/page_white_text.png +0 -0
  69. data/doc/images/page_white_width.png +0 -0
  70. data/doc/images/plugin.png +0 -0
  71. data/doc/images/ruby.png +0 -0
  72. data/doc/images/tag_blue.png +0 -0
  73. data/doc/images/tag_green.png +0 -0
  74. data/doc/images/transparent.png +0 -0
  75. data/doc/images/wrench.png +0 -0
  76. data/doc/images/wrench_orange.png +0 -0
  77. data/doc/images/zoom.png +0 -0
  78. data/doc/js/darkfish.js +0 -155
  79. data/doc/js/navigation.js +0 -142
  80. data/doc/js/search.js +0 -94
  81. data/doc/js/search_index.js +0 -1
  82. data/doc/js/searcher.js +0 -228
  83. data/doc/rdoc.css +0 -595
  84. data/doc/table_of_contents.html +0 -138
@@ -1,396 +1,755 @@
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::ExtensionHandler - 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/extension_handler.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-new">::new</a>
77
-
78
- <li ><a href="#method-i-3C-3C">#&lt;&lt;</a>
79
-
80
- <li ><a href="#method-i-include-3F">#include?</a>
81
-
82
- <li ><a href="#method-i-is_a_workspace-3F">#is_a_workspace?</a>
83
-
84
- </ul>
85
- </nav>
86
-
87
- </div>
88
-
89
- <div id="project-metadata">
90
-
91
- <nav id="classindex-section" class="section project-section">
92
- <h3 class="section-header">Class and Module Index</h3>
93
-
94
- <ul class="link-list">
95
-
96
- <li><a href="../../NetLinx.html">NetLinx</a>
97
-
98
- <li><a href="../../NetLinx/Compile.html">NetLinx::Compile</a>
99
-
100
- <li><a href="../../NetLinx/Compile/Extension.html">NetLinx::Compile::Extension</a>
101
-
102
- <li><a href="../../NetLinx/Compile/Extension/AXS.html">NetLinx::Compile::Extension::AXS</a>
103
-
104
- <li><a href="../../NetLinx/Compile/ExtensionDiscovery.html">NetLinx::Compile::ExtensionDiscovery</a>
105
-
106
- <li><a href="../../NetLinx/Compile/ExtensionHandler.html">NetLinx::Compile::ExtensionHandler</a>
107
-
108
- <li><a href="../../NetLinx/Compile/Script.html">NetLinx::Compile::Script</a>
109
-
110
- <li><a href="../../NetLinx/Compiler.html">NetLinx::Compiler</a>
111
-
112
- <li><a href="../../NetLinx/CompilerResult.html">NetLinx::CompilerResult</a>
113
-
114
- <li><a href="../../NetLinx/NoCompilerError.html">NetLinx::NoCompilerError</a>
115
-
116
- <li><a href="../../NetLinx/SourceFile.html">NetLinx::SourceFile</a>
117
-
118
- <li><a href="../../Test.html">Test</a>
119
-
120
- <li><a href="../../Test/NetLinx.html">Test::NetLinx</a>
121
-
122
- <li><a href="../../Test/NetLinx/Compilable.html">Test::NetLinx::Compilable</a>
123
-
124
- <li><a href="../../Test/NetLinx/Compile.html">Test::NetLinx::Compile</a>
125
-
126
- <li><a href="../../Test/NetLinx/Compile/Discoverable.html">Test::NetLinx::Compile::Discoverable</a>
127
-
128
- <li><a href="../../Test/NetLinx/Compile/Invokable.html">Test::NetLinx::Compile::Invokable</a>
129
-
130
- </ul>
131
- </nav>
132
-
133
- </div>
134
- </nav>
135
-
136
- <div id="documentation">
137
- <h1 class="class">class NetLinx::Compile::ExtensionHandler</h1>
138
-
139
- <div id="description" class="description">
140
-
141
- <p>Tells netlinx-compile which class handles the compiling of a set of file
142
- extensions.</p>
143
-
144
- </div><!-- description -->
145
-
146
-
147
-
148
-
149
- <section id="5Buntitled-5D" class="documentation-section">
150
-
151
-
152
-
153
-
154
-
155
-
156
-
157
- <!-- Attributes -->
158
- <section id="attribute-method-details" class="method-section section">
159
- <h3 class="section-header">Attributes</h3>
160
-
161
-
162
- <div id="attribute-i-extensions" class="method-detail">
163
- <div class="method-heading attribute-method-heading">
164
- <span class="method-name">extensions</span><span
165
- class="attribute-access-type">[RW]</span>
166
- </div>
167
-
168
- <div class="method-description">
169
-
170
- <p>A list of file extensions that this <a
171
- href="ExtensionHandler.html">ExtensionHandler</a> handles.</p>
172
-
173
- </div>
174
- </div>
175
-
176
- <div id="attribute-i-handler_class" class="method-detail">
177
- <div class="method-heading attribute-method-heading">
178
- <span class="method-name">handler_class</span><span
179
- class="attribute-access-type">[R]</span>
180
- </div>
181
-
182
- <div class="method-description">
183
-
184
- <p>The class to invoke to handle compiling a file extension specified in this
185
- <a href="ExtensionHandler.html">ExtensionHandler</a>.</p>
186
-
187
- </div>
188
- </div>
189
-
190
- <div id="attribute-i-usurps" class="method-detail">
191
- <div class="method-heading attribute-method-heading">
192
- <span class="method-name">usurps</span><span
193
- class="attribute-access-type">[RW]</span>
194
- </div>
195
-
196
- <div class="method-description">
197
-
198
- <p>A list of file extensions that this <a
199
- href="ExtensionHandler.html">ExtensionHandler</a> usurps. For example,
200
- third-party workspace extensions would probably usurp the .apw workspace
201
- extension.</p>
202
-
203
- </div>
204
- </div>
205
-
206
- </section><!-- attribute-method-details -->
207
-
208
-
209
- <!-- Methods -->
210
-
211
- <section id="public-class-5Buntitled-5D-method-details" class="method-section section">
212
- <h3 class="section-header">Public Class Methods</h3>
213
-
214
-
215
- <div id="method-c-new" class="method-detail ">
216
-
217
- <div class="method-heading">
218
- <span class="method-name">new</span><span
219
- class="method-args">(**kvargs)</span>
220
-
221
- <span class="method-click-advice">click to toggle source</span>
222
-
223
- </div>
224
-
225
-
226
- <div class="method-description">
227
-
228
- <p>Parameters:</p>
229
-
230
- <pre class="ruby"><span class="ruby-identifier">extensions</span><span class="ruby-operator">:</span> <span class="ruby-constant">An</span> <span class="ruby-identifier">array</span> <span class="ruby-identifier">of</span> <span class="ruby-identifier">file</span> <span class="ruby-identifier">extensions</span> (<span class="ruby-identifier">without</span> <span class="ruby-identifier">the</span> <span class="ruby-identifier">leading</span> <span class="ruby-identifier">dot</span>)
231
- <span class="ruby-identifier">that</span> <span class="ruby-identifier">this</span> <span class="ruby-constant">ExtensionHandler</span> <span class="ruby-identifier">supports</span>.
232
-
233
- <span class="ruby-identifier">usurps</span><span class="ruby-operator">:</span> <span class="ruby-constant">Future</span>.
234
- <span class="ruby-constant">Lets</span> <span class="ruby-identifier">this</span> <span class="ruby-constant">ExtensionHandler</span> <span class="ruby-identifier">take</span> <span class="ruby-identifier">priority</span> <span class="ruby-identifier">over</span> <span class="ruby-identifier">other</span>
235
- <span class="ruby-identifier">ones</span>. <span class="ruby-constant">For</span> <span class="ruby-identifier">example</span>, <span class="ruby-identifier">most</span> <span class="ruby-identifier">third</span><span class="ruby-operator">-</span><span class="ruby-identifier">party</span> <span class="ruby-identifier">handlers</span> <span class="ruby-identifier">would</span>
236
- <span class="ruby-identifier">probably</span> <span class="ruby-identifier">usurp</span> <span class="ruby-identifier">the</span> .<span class="ruby-identifier">apw</span> <span class="ruby-constant">NetLinx</span> <span class="ruby-constant">Studio</span> <span class="ruby-identifier">workspace</span>
237
- <span class="ruby-identifier">extension</span>.
238
-
239
- <span class="ruby-identifier">is_a_workspace</span><span class="ruby-operator">:</span> <span class="ruby-constant">Set</span> <span class="ruby-identifier">to</span> <span class="ruby-keyword">true</span> <span class="ruby-keyword">if</span> <span class="ruby-identifier">this</span> <span class="ruby-constant">ExtensionHandler</span> <span class="ruby-identifier">is</span> <span class="ruby-keyword">for</span>
240
- <span class="ruby-identifier">compiling</span> <span class="ruby-identifier">a</span> <span class="ruby-identifier">workspace</span>. <span class="ruby-constant">False</span> <span class="ruby-identifier">by</span> <span class="ruby-identifier">default</span>. <span class="ruby-constant">This</span>
241
- <span class="ruby-identifier">parameter</span> <span class="ruby-identifier">assists</span> <span class="ruby-identifier">with</span> <span class="ruby-identifier">smart</span> <span class="ruby-identifier">compiling</span>, <span class="ruby-identifier">as</span>
242
- <span class="ruby-constant">ExtensionDiscovery</span> <span class="ruby-identifier">can</span> <span class="ruby-keyword">return</span> <span class="ruby-identifier">all</span> <span class="ruby-identifier">workspace_handlers</span>.
243
-
244
- <span class="ruby-identifier">handler_class</span><span class="ruby-operator">:</span> <span class="ruby-constant">A</span> <span class="ruby-identifier">reference</span> <span class="ruby-identifier">to</span> <span class="ruby-identifier">the</span> <span class="ruby-keyword">class</span> <span class="ruby-identifier">that</span> <span class="ruby-identifier">should</span> <span class="ruby-identifier">be</span> <span class="ruby-identifier">instantiated</span>
245
- <span class="ruby-keyword">if</span> <span class="ruby-identifier">this</span> <span class="ruby-identifier">handler</span> <span class="ruby-identifier">is</span> <span class="ruby-identifier">selected</span>. <span class="ruby-constant">For</span> <span class="ruby-identifier">example</span>,
246
- <span class="ruby-constant">NetLinx</span><span class="ruby-operator">::</span><span class="ruby-constant">SourceFile</span> <span class="ruby-identifier">is</span> <span class="ruby-identifier">the</span> <span class="ruby-keyword">class</span> <span class="ruby-identifier">that</span> <span class="ruby-identifier">handles</span> <span class="ruby-identifier">files</span>
247
- <span class="ruby-identifier">with</span> <span class="ruby-identifier">the</span> .<span class="ruby-identifier">axs</span> <span class="ruby-identifier">extension</span>.
248
- </pre>
249
-
250
-
251
-
252
-
253
- <div class="method-source-code" id="new-source">
254
- <pre><span class="ruby-comment"># File lib/netlinx/compile/extension_handler.rb, line 37</span>
255
- <span class="ruby-keyword">def</span> <span class="ruby-identifier">initialize</span>(<span class="ruby-operator">**</span><span class="ruby-identifier">kvargs</span>)
256
- <span class="ruby-ivar">@extensions</span> = <span class="ruby-identifier">kvargs</span>.<span class="ruby-identifier">fetch</span> <span class="ruby-value">:extensions</span>, []
257
- <span class="ruby-ivar">@usurps</span> = <span class="ruby-identifier">kvargs</span>.<span class="ruby-identifier">fetch</span> <span class="ruby-value">:usurps</span>, []
258
- <span class="ruby-ivar">@is_a_workspace</span> = <span class="ruby-identifier">kvargs</span>.<span class="ruby-identifier">fetch</span> <span class="ruby-value">:is_a_workspace</span>, <span class="ruby-keyword">false</span>
259
- <span class="ruby-ivar">@handler_class</span> = <span class="ruby-identifier">kvargs</span>.<span class="ruby-identifier">fetch</span> <span class="ruby-value">:handler_class</span>, <span class="ruby-keyword">nil</span>
260
- <span class="ruby-keyword">end</span></pre>
261
- </div><!-- new-source -->
262
-
263
- </div>
264
-
265
-
266
-
267
-
268
- </div><!-- new-method -->
269
-
270
-
271
- </section><!-- public-class-method-details -->
272
-
273
- <section id="public-instance-5Buntitled-5D-method-details" class="method-section section">
274
- <h3 class="section-header">Public Instance Methods</h3>
275
-
276
-
277
- <div id="method-i-3C-3C" class="method-detail ">
278
-
279
- <div class="method-heading">
280
- <span class="method-name">&lt;&lt;</span><span
281
- class="method-args">(file_extension)</span>
282
-
283
- <span class="method-click-advice">click to toggle source</span>
284
-
285
- </div>
286
-
287
-
288
- <div class="method-description">
289
-
290
- <p>Alias to add a file extension.</p>
291
-
292
-
293
-
294
-
295
- <div class="method-source-code" id="3C-3C-source">
296
- <pre><span class="ruby-comment"># File lib/netlinx/compile/extension_handler.rb, line 45</span>
297
- <span class="ruby-keyword">def</span> <span class="ruby-operator">&lt;&lt;</span>(<span class="ruby-identifier">file_extension</span>)
298
- <span class="ruby-ivar">@extensions</span> <span class="ruby-operator">&lt;&lt;</span> <span class="ruby-identifier">parse_extension</span>(<span class="ruby-identifier">file_extension</span>)
299
- <span class="ruby-keyword">end</span></pre>
300
- </div><!-- 3C-3C-source -->
301
-
302
- </div>
303
-
304
-
305
-
306
-
307
- </div><!-- 3C-3C-method -->
308
-
309
-
310
- <div id="method-i-include-3F" class="method-detail ">
311
-
312
- <div class="method-heading">
313
- <span class="method-name">include?</span><span
314
- class="method-args">(file_extension)</span>
315
-
316
- <span class="method-click-advice">click to toggle source</span>
317
-
318
- </div>
319
-
320
-
321
- <div class="method-description">
322
-
323
- <p>Returns true if this <a href="ExtensionHandler.html">ExtensionHandler</a>
324
- can handle the specified file extension.</p>
325
-
326
-
327
-
328
-
329
- <div class="method-source-code" id="include-3F-source">
330
- <pre><span class="ruby-comment"># File lib/netlinx/compile/extension_handler.rb, line 64</span>
331
- <span class="ruby-keyword">def</span> <span class="ruby-identifier">include?</span>(<span class="ruby-identifier">file_extension</span>)
332
- <span class="ruby-ivar">@extensions</span>.<span class="ruby-identifier">include?</span> <span class="ruby-identifier">parse_extension</span>(<span class="ruby-identifier">file_extension</span>)
333
- <span class="ruby-keyword">end</span></pre>
334
- </div><!-- include-3F-source -->
335
-
336
- </div>
337
-
338
-
339
-
340
-
341
- </div><!-- include-3F-method -->
342
-
343
-
344
- <div id="method-i-is_a_workspace-3F" class="method-detail ">
345
-
346
- <div class="method-heading">
347
- <span class="method-name">is_a_workspace?</span><span
348
- class="method-args">()</span>
349
-
350
- <span class="method-click-advice">click to toggle source</span>
351
-
352
- </div>
353
-
354
-
355
- <div class="method-description">
356
-
357
- <p>Returns true if the <a href="ExtensionHandler.html">ExtensionHandler</a>
358
- handles a workspace file (as opposed to a source code file).</p>
359
-
360
- <p>Workspace files are significant because they contain information about a
361
- project, connection settings for a master, and possibly multiple systems
362
- that need to be compiled. Therefore, when smart-compiling, workspaces need
363
- to be distinguished from source code files because discovering a workspace
364
- should be considered a better match than discovering a source code file.</p>
365
-
366
-
367
-
368
-
369
- <div class="method-source-code" id="is_a_workspace-3F-source">
370
- <pre><span class="ruby-comment"># File lib/netlinx/compile/extension_handler.rb, line 58</span>
371
- <span class="ruby-keyword">def</span> <span class="ruby-identifier">is_a_workspace?</span>
372
- <span class="ruby-ivar">@is_a_workspace</span>
373
- <span class="ruby-keyword">end</span></pre>
374
- </div><!-- is_a_workspace-3F-source -->
375
-
376
- </div>
377
-
378
-
379
-
380
-
381
- </div><!-- is_a_workspace-3F-method -->
382
-
383
-
384
- </section><!-- public-instance-method-details -->
385
-
386
- </section><!-- 5Buntitled-5D -->
387
-
388
- </div><!-- documentation -->
389
-
390
-
391
- <footer id="validator-badges">
392
- <p><a href="http://validator.w3.org/check/referer">[Validate]</a>
393
- <p>Generated by <a href="https://github.com/rdoc/rdoc">RDoc</a> 4.0.1.
394
- <p>Generated with the <a href="http://deveiate.org/projects/Darkfish-Rdoc/">Darkfish Rdoc Generator</a> 3.
395
- </footer>
396
-
1
+ <!DOCTYPE html>
2
+ <html>
3
+ <head>
4
+ <meta charset="utf-8">
5
+ <meta name="viewport" content="width=device-width, initial-scale=1.0">
6
+ <title>
7
+ Class: NetLinx::Compile::ExtensionHandler
8
+
9
+ &mdash; Documentation by YARD 0.9.25
10
+
11
+ </title>
12
+
13
+ <link rel="stylesheet" href="../../css/style.css" type="text/css" />
14
+
15
+ <link rel="stylesheet" href="../../css/common.css" type="text/css" />
16
+
17
+ <script type="text/javascript">
18
+ pathId = "NetLinx::Compile::ExtensionHandler";
19
+ relpath = '../../';
20
+ </script>
21
+
22
+
23
+ <script type="text/javascript" charset="utf-8" src="../../js/jquery.js"></script>
24
+
25
+ <script type="text/javascript" charset="utf-8" src="../../js/app.js"></script>
26
+
27
+
28
+ </head>
29
+ <body>
30
+ <div class="nav_wrap">
31
+ <iframe id="nav" src="../../class_list.html?1"></iframe>
32
+ <div id="resizer"></div>
33
+ </div>
34
+
35
+ <div id="main" tabindex="-1">
36
+ <div id="header">
37
+ <div id="menu">
38
+
39
+ <a href="../../_index.html">Index (E)</a> &raquo;
40
+ <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>
41
+ &raquo;
42
+ <span class="title">ExtensionHandler</span>
43
+
44
+ </div>
45
+
46
+ <div id="search">
47
+
48
+ <a class="full_list_link" id="class_list_link"
49
+ href="../../class_list.html">
50
+
51
+ <svg width="24" height="24">
52
+ <rect x="0" y="4" width="24" height="4" rx="1" ry="1"></rect>
53
+ <rect x="0" y="12" width="24" height="4" rx="1" ry="1"></rect>
54
+ <rect x="0" y="20" width="24" height="4" rx="1" ry="1"></rect>
55
+ </svg>
56
+ </a>
57
+
58
+ </div>
59
+ <div class="clear"></div>
60
+ </div>
61
+
62
+ <div id="content"><h1>Class: NetLinx::Compile::ExtensionHandler
63
+
64
+
65
+
66
+ </h1>
67
+ <div class="box_info">
68
+
69
+ <dl>
70
+ <dt>Inherits:</dt>
71
+ <dd>
72
+ <span class="inheritName">Object</span>
73
+
74
+ <ul class="fullTree">
75
+ <li>Object</li>
76
+
77
+ <li class="next">NetLinx::Compile::ExtensionHandler</li>
78
+
79
+ </ul>
80
+ <a href="#" class="inheritanceTree">show all</a>
81
+
82
+ </dd>
83
+ </dl>
84
+
85
+
86
+
87
+
88
+
89
+
90
+
91
+
92
+
93
+
94
+
95
+ <dl>
96
+ <dt>Defined in:</dt>
97
+ <dd>lib/netlinx/compile/extension_handler.rb</dd>
98
+ </dl>
99
+
100
+ </div>
101
+
102
+ <h2>Overview</h2><div class="docstring">
103
+ <div class="discussion">
104
+
105
+ <p>Tells netlinx-compile which class handles the compiling of a set of file extensions.</p>
106
+
107
+
108
+ </div>
109
+ </div>
110
+ <div class="tags">
111
+
112
+
113
+ </div>
114
+
115
+
116
+
117
+ <h2>Instance 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="#extensions-instance_method" title="#extensions (instance method)">#<strong>extensions</strong> &#x21d2; Object </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>A list of file extensions that this ExtensionHandler handles.</p>
142
+ </div></span>
143
+
144
+ </li>
145
+
146
+
147
+ <li class="public ">
148
+ <span class="summary_signature">
149
+
150
+ <a href="#handler_class-instance_method" title="#handler_class (instance method)">#<strong>handler_class</strong> &#x21d2; Object </a>
151
+
152
+
153
+
154
+ </span>
155
+
156
+
157
+
158
+
159
+ <span class="note title readonly">readonly</span>
160
+
161
+
162
+
163
+
164
+
165
+
166
+
167
+
168
+
169
+ <span class="summary_desc"><div class='inline'>
170
+ <p>The class to invoke to handle compiling a file extension specified in this ExtensionHandler.</p>
171
+ </div></span>
172
+
173
+ </li>
174
+
175
+
176
+ <li class="public ">
177
+ <span class="summary_signature">
178
+
179
+ <a href="#usurps-instance_method" title="#usurps (instance method)">#<strong>usurps</strong> &#x21d2; Object </a>
180
+
181
+
182
+
183
+ </span>
184
+
185
+
186
+
187
+
188
+
189
+
190
+
191
+
192
+
193
+
194
+
195
+
196
+ <span class="summary_desc"><div class='inline'>
197
+ <p>A list of file extensions that this ExtensionHandler usurps.</p>
198
+ </div></span>
199
+
200
+ </li>
201
+
202
+
203
+ </ul>
204
+
205
+
206
+
207
+
208
+
209
+ <h2>
210
+ Instance Method Summary
211
+ <small><a href="#" class="summary_toggle">collapse</a></small>
212
+ </h2>
213
+
214
+ <ul class="summary">
215
+
216
+ <li class="public ">
217
+ <span class="summary_signature">
218
+
219
+ <a href="#<<-instance_method" title="#&lt;&lt; (instance method)">#<strong>&lt;&lt;</strong>(file_extension) &#x21d2; Object </a>
220
+
221
+
222
+
223
+ </span>
224
+
225
+
226
+
227
+
228
+
229
+
230
+
231
+
232
+
233
+ <span class="summary_desc"><div class='inline'>
234
+ <p>Alias to add a file extension.</p>
235
+ </div></span>
236
+
237
+ </li>
238
+
239
+
240
+ <li class="public ">
241
+ <span class="summary_signature">
242
+
243
+ <a href="#include%3F-instance_method" title="#include? (instance method)">#<strong>include?</strong>(file_extension) &#x21d2; Boolean </a>
244
+
245
+
246
+
247
+ </span>
248
+
249
+
250
+
251
+
252
+
253
+
254
+
255
+
256
+
257
+ <span class="summary_desc"><div class='inline'>
258
+ <p>Returns true if this <span class='object_link'><a href="" title="NetLinx::Compile::ExtensionHandler (class)">ExtensionHandler</a></span> can handle the specified file extension.</p>
259
+ </div></span>
260
+
261
+ </li>
262
+
263
+
264
+ <li class="public ">
265
+ <span class="summary_signature">
266
+
267
+ <a href="#initialize-instance_method" title="#initialize (instance method)">#<strong>initialize</strong>(**kwargs) &#x21d2; ExtensionHandler </a>
268
+
269
+
270
+
271
+ </span>
272
+
273
+
274
+ <span class="note title constructor">constructor</span>
275
+
276
+
277
+
278
+
279
+
280
+
281
+
282
+
283
+ <span class="summary_desc"><div class='inline'>
284
+ <p>A new instance of ExtensionHandler.</p>
285
+ </div></span>
286
+
287
+ </li>
288
+
289
+
290
+ <li class="public ">
291
+ <span class="summary_signature">
292
+
293
+ <a href="#is_a_workspace%3F-instance_method" title="#is_a_workspace? (instance method)">#<strong>is_a_workspace?</strong> &#x21d2; Boolean </a>
294
+
295
+
296
+
297
+ </span>
298
+
299
+
300
+
301
+
302
+
303
+
304
+
305
+
306
+
307
+ <span class="summary_desc"><div class='inline'>
308
+ <p>Workspace files are significant because they contain information about a project, connection settings for a master, and possibly multiple systems that need to be compiled.</p>
309
+ </div></span>
310
+
311
+ </li>
312
+
313
+
314
+ </ul>
315
+
316
+
317
+ <div id="constructor_details" class="method_details_list">
318
+ <h2>Constructor Details</h2>
319
+
320
+ <div class="method_details first">
321
+ <h3 class="signature first" id="initialize-instance_method">
322
+
323
+ #<strong>initialize</strong>(**kwargs) &#x21d2; <tt><span class='object_link'><a href="" title="NetLinx::Compile::ExtensionHandler (class)">ExtensionHandler</a></span></tt>
324
+
325
+
326
+
327
+
328
+
329
+ </h3><div class="docstring">
330
+ <div class="discussion">
331
+
332
+ <p>Returns a new instance of ExtensionHandler.</p>
333
+
334
+
335
+ </div>
336
+ </div>
337
+ <div class="tags">
338
+ <p class="tag_title">Parameters:</p>
339
+ <ul class="param">
340
+
341
+ <li>
342
+
343
+ <span class='name'>kwargs</span>
344
+
345
+
346
+ <span class='type'>(<tt>Hash</tt>)</span>
347
+
348
+
349
+
350
+ &mdash;
351
+ <div class='inline'>
352
+ <p>a customizable set of options</p>
353
+ </div>
354
+
355
+ </li>
356
+
357
+ </ul>
358
+
359
+
360
+
361
+
362
+ <p class="tag_title">Options Hash (<tt>**kwargs</tt>):</p>
363
+ <ul class="option">
364
+
365
+ <li>
366
+ <span class="name">:extensions</span>
367
+ <span class="type">(<tt>Array&lt;String&gt;</tt>)</span>
368
+ <span class="default">
369
+
370
+ </span>
371
+
372
+ &mdash; <div class='inline'>
373
+ <p>File extensions (without the leading dot) that this ExtensionHandler supports.</p>
374
+ </div>
375
+
376
+ </li>
377
+
378
+ <li>
379
+ <span class="name">:usurps</span>
380
+ <span class="type">(<tt>Array&lt;String&gt;</tt>)</span>
381
+ <span class="default">
382
+
383
+ </span>
384
+
385
+ &mdash; <div class='inline'>
386
+ <p>Future. Lets this ExtensionHandler take priority over other ones. For example, most third-party handlers would probably usurp the .apw NetLinx Studio workspace extension.</p>
387
+ </div>
388
+
389
+ </li>
390
+
391
+ <li>
392
+ <span class="name">:is_a_workspace</span>
393
+ <span class="type">(<tt>Boolean</tt>)</span>
394
+ <span class="default">
395
+
396
+ </span>
397
+
398
+ &mdash; <div class='inline'>
399
+ <p>Set to true if this ExtensionHandler is for compiling a workspace. False by default. This parameter assists with smart compiling, as <span class='object_link'><a href="ExtensionDiscovery.html" title="NetLinx::Compile::ExtensionDiscovery (class)">NetLinx::Compile::ExtensionDiscovery</a></span> can return all workspace_handlers.</p>
400
+ </div>
401
+
402
+ </li>
403
+
404
+ <li>
405
+ <span class="name">:handler_class</span>
406
+ <span class="type">(<tt><span class='object_link'><a href="Extension.html" title="NetLinx::Compile::Extension (module)">Extension</a></span></tt>)</span>
407
+ <span class="default">
408
+
409
+ </span>
410
+
411
+ &mdash; <div class='inline'>
412
+ <p>A reference to the class that should be instantiated if this handler is selected. For example, <span class='object_link'><a href="../SourceFile.html" title="NetLinx::SourceFile (class)">SourceFile</a></span> is the class that handles files with the .axs extension.</p>
413
+ </div>
414
+
415
+ </li>
416
+
417
+ </ul>
418
+
419
+
420
+
421
+ </div><table class="source_code">
422
+ <tr>
423
+ <td>
424
+ <pre class="lines">
425
+
426
+
427
+ 35
428
+ 36
429
+ 37
430
+ 38
431
+ 39
432
+ 40</pre>
433
+ </td>
434
+ <td>
435
+ <pre class="code"><span class="info file"># File 'lib/netlinx/compile/extension_handler.rb', line 35</span>
436
+
437
+ <span class='kw'>def</span> <span class='id identifier rubyid_initialize'>initialize</span><span class='lparen'>(</span><span class='op'>**</span><span class='id identifier rubyid_kwargs'>kwargs</span><span class='rparen'>)</span>
438
+ <span class='ivar'>@extensions</span> <span class='op'>=</span> <span class='id identifier rubyid_kwargs'>kwargs</span><span class='period'>.</span><span class='id identifier rubyid_fetch'>fetch</span> <span class='symbol'>:extensions</span><span class='comma'>,</span> <span class='lbracket'>[</span><span class='rbracket'>]</span>
439
+ <span class='ivar'>@usurps</span> <span class='op'>=</span> <span class='id identifier rubyid_kwargs'>kwargs</span><span class='period'>.</span><span class='id identifier rubyid_fetch'>fetch</span> <span class='symbol'>:usurps</span><span class='comma'>,</span> <span class='lbracket'>[</span><span class='rbracket'>]</span>
440
+ <span class='ivar'>@is_a_workspace</span> <span class='op'>=</span> <span class='id identifier rubyid_kwargs'>kwargs</span><span class='period'>.</span><span class='id identifier rubyid_fetch'>fetch</span> <span class='symbol'>:is_a_workspace</span><span class='comma'>,</span> <span class='kw'>false</span>
441
+ <span class='ivar'>@handler_class</span> <span class='op'>=</span> <span class='id identifier rubyid_kwargs'>kwargs</span><span class='period'>.</span><span class='id identifier rubyid_fetch'>fetch</span> <span class='symbol'>:handler_class</span><span class='comma'>,</span> <span class='kw'>nil</span>
442
+ <span class='kw'>end</span></pre>
443
+ </td>
444
+ </tr>
445
+ </table>
446
+ </div>
447
+
448
+ </div>
449
+
450
+ <div id="instance_attr_details" class="attr_details">
451
+ <h2>Instance Attribute Details</h2>
452
+
453
+
454
+ <span id="extensions=-instance_method"></span>
455
+ <div class="method_details first">
456
+ <h3 class="signature first" id="extensions-instance_method">
457
+
458
+ #<strong>extensions</strong> &#x21d2; <tt>Object</tt>
459
+
460
+
461
+
462
+
463
+
464
+ </h3><div class="docstring">
465
+ <div class="discussion">
466
+
467
+ <p>A list of file extensions that this ExtensionHandler handles.</p>
468
+
469
+
470
+ </div>
471
+ </div>
472
+ <div class="tags">
473
+
474
+
475
+ </div><table class="source_code">
476
+ <tr>
477
+ <td>
478
+ <pre class="lines">
479
+
480
+
481
+ 7
482
+ 8
483
+ 9</pre>
484
+ </td>
485
+ <td>
486
+ <pre class="code"><span class="info file"># File 'lib/netlinx/compile/extension_handler.rb', line 7</span>
487
+
488
+ <span class='kw'>def</span> <span class='id identifier rubyid_extensions'>extensions</span>
489
+ <span class='ivar'>@extensions</span>
490
+ <span class='kw'>end</span></pre>
491
+ </td>
492
+ </tr>
493
+ </table>
494
+ </div>
495
+
496
+
497
+ <span id=""></span>
498
+ <div class="method_details ">
499
+ <h3 class="signature " id="handler_class-instance_method">
500
+
501
+ #<strong>handler_class</strong> &#x21d2; <tt>Object</tt> <span class="extras">(readonly)</span>
502
+
503
+
504
+
505
+
506
+
507
+ </h3><div class="docstring">
508
+ <div class="discussion">
509
+
510
+ <p>The class to invoke to handle compiling a file extension specified in this ExtensionHandler.</p>
511
+
512
+
513
+ </div>
514
+ </div>
515
+ <div class="tags">
516
+
517
+
518
+ </div><table class="source_code">
519
+ <tr>
520
+ <td>
521
+ <pre class="lines">
522
+
523
+
524
+ 16
525
+ 17
526
+ 18</pre>
527
+ </td>
528
+ <td>
529
+ <pre class="code"><span class="info file"># File 'lib/netlinx/compile/extension_handler.rb', line 16</span>
530
+
531
+ <span class='kw'>def</span> <span class='id identifier rubyid_handler_class'>handler_class</span>
532
+ <span class='ivar'>@handler_class</span>
533
+ <span class='kw'>end</span></pre>
534
+ </td>
535
+ </tr>
536
+ </table>
537
+ </div>
538
+
539
+
540
+ <span id="usurps=-instance_method"></span>
541
+ <div class="method_details ">
542
+ <h3 class="signature " id="usurps-instance_method">
543
+
544
+ #<strong>usurps</strong> &#x21d2; <tt>Object</tt>
545
+
546
+
547
+
548
+
549
+
550
+ </h3><div class="docstring">
551
+ <div class="discussion">
552
+
553
+ <p>A list of file extensions that this ExtensionHandler usurps. For example, third-party workspace extensions would probably usurp the .apw workspace extension.</p>
554
+
555
+
556
+ </div>
557
+ </div>
558
+ <div class="tags">
559
+
560
+
561
+ </div><table class="source_code">
562
+ <tr>
563
+ <td>
564
+ <pre class="lines">
565
+
566
+
567
+ 12
568
+ 13
569
+ 14</pre>
570
+ </td>
571
+ <td>
572
+ <pre class="code"><span class="info file"># File 'lib/netlinx/compile/extension_handler.rb', line 12</span>
573
+
574
+ <span class='kw'>def</span> <span class='id identifier rubyid_usurps'>usurps</span>
575
+ <span class='ivar'>@usurps</span>
576
+ <span class='kw'>end</span></pre>
577
+ </td>
578
+ </tr>
579
+ </table>
580
+ </div>
581
+
582
+ </div>
583
+
584
+
585
+ <div id="instance_method_details" class="method_details_list">
586
+ <h2>Instance Method Details</h2>
587
+
588
+
589
+ <div class="method_details first">
590
+ <h3 class="signature first" id="<<-instance_method">
591
+
592
+ #<strong>&lt;&lt;</strong>(file_extension) &#x21d2; <tt>Object</tt>
593
+
594
+
595
+
596
+
597
+
598
+ </h3><div class="docstring">
599
+ <div class="discussion">
600
+
601
+ <p>Alias to add a file extension.</p>
602
+
603
+
604
+ </div>
605
+ </div>
606
+ <div class="tags">
607
+
608
+
609
+ </div><table class="source_code">
610
+ <tr>
611
+ <td>
612
+ <pre class="lines">
613
+
614
+
615
+ 43
616
+ 44
617
+ 45</pre>
618
+ </td>
619
+ <td>
620
+ <pre class="code"><span class="info file"># File 'lib/netlinx/compile/extension_handler.rb', line 43</span>
621
+
622
+ <span class='kw'>def</span> <span class='op'>&lt;&lt;</span><span class='lparen'>(</span><span class='id identifier rubyid_file_extension'>file_extension</span><span class='rparen'>)</span>
623
+ <span class='ivar'>@extensions</span> <span class='op'>&lt;&lt;</span> <span class='id identifier rubyid_parse_extension'>parse_extension</span><span class='lparen'>(</span><span class='id identifier rubyid_file_extension'>file_extension</span><span class='rparen'>)</span>
624
+ <span class='kw'>end</span></pre>
625
+ </td>
626
+ </tr>
627
+ </table>
628
+ </div>
629
+
630
+ <div class="method_details ">
631
+ <h3 class="signature " id="include?-instance_method">
632
+
633
+ #<strong>include?</strong>(file_extension) &#x21d2; <tt>Boolean</tt>
634
+
635
+
636
+
637
+
638
+
639
+ </h3><div class="docstring">
640
+ <div class="discussion">
641
+
642
+ <p>Returns true if this <span class='object_link'><a href="" title="NetLinx::Compile::ExtensionHandler (class)">NetLinx::Compile::ExtensionHandler</a></span> can handle the specified file extension.</p>
643
+
644
+
645
+ </div>
646
+ </div>
647
+ <div class="tags">
648
+
649
+ <p class="tag_title">Returns:</p>
650
+ <ul class="return">
651
+
652
+ <li>
653
+
654
+
655
+ <span class='type'>(<tt>Boolean</tt>)</span>
656
+
657
+
658
+
659
+ </li>
660
+
661
+ </ul>
662
+
663
+ </div><table class="source_code">
664
+ <tr>
665
+ <td>
666
+ <pre class="lines">
667
+
668
+
669
+ 62
670
+ 63
671
+ 64</pre>
672
+ </td>
673
+ <td>
674
+ <pre class="code"><span class="info file"># File 'lib/netlinx/compile/extension_handler.rb', line 62</span>
675
+
676
+ <span class='kw'>def</span> <span class='id identifier rubyid_include?'>include?</span><span class='lparen'>(</span><span class='id identifier rubyid_file_extension'>file_extension</span><span class='rparen'>)</span>
677
+ <span class='ivar'>@extensions</span><span class='period'>.</span><span class='id identifier rubyid_include?'>include?</span> <span class='id identifier rubyid_parse_extension'>parse_extension</span><span class='lparen'>(</span><span class='id identifier rubyid_file_extension'>file_extension</span><span class='rparen'>)</span>
678
+ <span class='kw'>end</span></pre>
679
+ </td>
680
+ </tr>
681
+ </table>
682
+ </div>
683
+
684
+ <div class="method_details ">
685
+ <h3 class="signature " id="is_a_workspace?-instance_method">
686
+
687
+ #<strong>is_a_workspace?</strong> &#x21d2; <tt>Boolean</tt>
688
+
689
+
690
+
691
+
692
+
693
+ </h3><div class="docstring">
694
+ <div class="discussion">
695
+
696
+ <p>Workspace files are significant because they contain information about a project, connection settings for a master, and possibly multiple systems that need to be compiled. Therefore, when smart-compiling, workspaces need to be distinguished from source code files because discovering a workspace should be considered a better match than discovering a source code file.</p>
697
+
698
+
699
+ </div>
700
+ </div>
701
+ <div class="tags">
702
+
703
+ <p class="tag_title">Returns:</p>
704
+ <ul class="return">
705
+
706
+ <li>
707
+
708
+
709
+ <span class='type'>(<tt>Boolean</tt>)</span>
710
+
711
+
712
+
713
+ &mdash;
714
+ <div class='inline'>
715
+ <p>true if the <span class='object_link'><a href="" title="NetLinx::Compile::ExtensionHandler (class)">NetLinx::Compile::ExtensionHandler</a></span> handles a workspace file (as opposed to a source code file).</p>
716
+ </div>
717
+
718
+ </li>
719
+
720
+ </ul>
721
+
722
+ </div><table class="source_code">
723
+ <tr>
724
+ <td>
725
+ <pre class="lines">
726
+
727
+
728
+ 56
729
+ 57
730
+ 58</pre>
731
+ </td>
732
+ <td>
733
+ <pre class="code"><span class="info file"># File 'lib/netlinx/compile/extension_handler.rb', line 56</span>
734
+
735
+ <span class='kw'>def</span> <span class='id identifier rubyid_is_a_workspace?'>is_a_workspace?</span>
736
+ <span class='ivar'>@is_a_workspace</span>
737
+ <span class='kw'>end</span></pre>
738
+ </td>
739
+ </tr>
740
+ </table>
741
+ </div>
742
+
743
+ </div>
744
+
745
+ </div>
746
+
747
+ <div id="footer">
748
+ Generated on Sat Jul 11 17:29:51 2020 by
749
+ <a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
750
+ 0.9.25 (ruby-2.7.1).
751
+ </div>
752
+
753
+ </div>
754
+ </body>
755
+ </html>