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,295 +1,382 @@
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::Compiler - 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::Compiler
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/Compiler.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 (C)</a> &raquo;
35
+ <span class='title'><span class='object_link'><a href="../NetLinx.html" title="NetLinx (module)">NetLinx</a></span></span>
36
+ &raquo;
37
+ <span class="title">Compiler</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::Compiler
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::Compiler</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/compiler.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>A wrapper class for the AMX NetLinx compiler executable (nlrc.exe).</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
+ Instance 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="#compile-instance_method" title="#compile (instance method)">- (Object) <strong>compile</strong>(compilable) </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>Compile the specified object with the NetLinx compiler.</p>
147
+ </div></span>
148
+
149
+ </li>
150
+
151
+
152
+ <li class="public ">
153
+ <span class="summary_signature">
154
+
155
+ <a href="#initialize-instance_method" title="#initialize (instance method)">- (Compiler) <strong>initialize</strong>(**kvargs) </a>
156
+
157
+
158
+
159
+ </span>
160
+
161
+
162
+ <span class="note title constructor">constructor</span>
163
+
164
+
165
+
166
+
167
+
168
+
169
+
170
+
171
+ <span class="summary_desc"><div class='inline'>
172
+ <p>Checks for the AMX NetLinx compiler (third-party software, nlrc.exe) at the
173
+ default installation path.</p>
174
+ </div></span>
175
+
176
+ </li>
177
+
178
+
179
+ </ul>
180
+
181
+
182
+ <div id="constructor_details" class="method_details_list">
183
+ <h2>Constructor Details</h2>
184
+
185
+ <div class="method_details first">
186
+ <h3 class="signature first" id="initialize-instance_method">
187
+
188
+ - (<tt><span class='object_link'><a href="" title="NetLinx::Compiler (class)">Compiler</a></span></tt>) <strong>initialize</strong>(**kvargs)
189
+
190
+
191
+
192
+
193
+
194
+ </h3><div class="docstring">
195
+ <div class="discussion">
196
+
197
+ <p>Checks for the AMX NetLinx compiler (third-party software, nlrc.exe) at the
198
+ default installation path. This can be overridden by specifying
199
+ :compiler_path.</p>
200
+
201
+
202
+ </div>
203
+ </div>
204
+ <div class="tags">
205
+
206
+
207
+ </div><table class="source_code">
208
+ <tr>
209
+ <td>
210
+ <pre class="lines">
211
+
212
+
213
+ 13
214
+ 14
215
+ 15
216
+ 16
217
+ 17
218
+ 18
219
+ 19
220
+ 20
221
+ 21
222
+ 22
223
+ 23
224
+ 24
225
+ 25
226
+ 26
227
+ 27
228
+ 28
229
+ 29
230
+ 30
231
+ 31
232
+ 32
233
+ 33</pre>
234
+ </td>
235
+ <td>
236
+ <pre class="code"><span class="info file"># File 'lib/netlinx/compiler.rb', line 13</span>
237
+
238
+ <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_kvargs'>kvargs</span><span class='rparen'>)</span>
239
+ <span class='ivar'>@compiler_exe</span> <span class='op'>=</span> <span class='tstring'><span class='tstring_beg'>&#39;</span><span class='tstring_content'>nlrc.exe</span><span class='tstring_end'>&#39;</span></span>
46
240
 
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/compiler.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-compile">#compile</a>
79
-
80
- </ul>
81
- </nav>
82
-
83
- </div>
84
-
85
- <div id="project-metadata">
86
-
87
- <nav id="classindex-section" class="section project-section">
88
- <h3 class="section-header">Class and Module Index</h3>
89
-
90
- <ul class="link-list">
91
-
92
- <li><a href="../NetLinx.html">NetLinx</a>
93
-
94
- <li><a href="../NetLinx/Compile.html">NetLinx::Compile</a>
95
-
96
- <li><a href="../NetLinx/Compile/Extension.html">NetLinx::Compile::Extension</a>
97
-
98
- <li><a href="../NetLinx/Compile/Extension/AXS.html">NetLinx::Compile::Extension::AXS</a>
99
-
100
- <li><a href="../NetLinx/Compile/ExtensionDiscovery.html">NetLinx::Compile::ExtensionDiscovery</a>
101
-
102
- <li><a href="../NetLinx/Compile/ExtensionHandler.html">NetLinx::Compile::ExtensionHandler</a>
103
-
104
- <li><a href="../NetLinx/Compile/Script.html">NetLinx::Compile::Script</a>
105
-
106
- <li><a href="../NetLinx/Compiler.html">NetLinx::Compiler</a>
107
-
108
- <li><a href="../NetLinx/CompilerResult.html">NetLinx::CompilerResult</a>
109
-
110
- <li><a href="../NetLinx/NoCompilerError.html">NetLinx::NoCompilerError</a>
111
-
112
- <li><a href="../NetLinx/SourceFile.html">NetLinx::SourceFile</a>
113
-
114
- <li><a href="../Test.html">Test</a>
115
-
116
- <li><a href="../Test/NetLinx.html">Test::NetLinx</a>
241
+ <span class='ivar'>@compiler_path</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'>:compiler_path</span><span class='comma'>,</span>
242
+ <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'>C:\Program Files (x86)\Common Files\AMXShare\COM</span><span class='tstring_end'>&#39;</span></span><span class='rparen'>)</span> <span class='comment'># 64-bit O/S path
243
+ </span>
244
+ <span class='comment'># Check for NetLinx compiler at :compiler_path or the 64-bit O/S path.
245
+ </span> <span class='kw'>unless</span> <span class='const'>File</span><span class='period'>.</span><span class='id identifier rubyid_exists?'>exists?</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'>nlrc.exe</span><span class='tstring_end'>&#39;</span></span><span class='comma'>,</span> <span class='ivar'>@compiler_path</span><span class='rparen'>)</span>
246
+ <span class='comment'># Compiler not found. Try 32-bit O/S path.
247
+ </span> <span class='ivar'>@compiler_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='lparen'>(</span><span class='tstring'><span class='tstring_beg'>&#39;</span><span class='tstring_content'>C:\Program Files\Common Files\AMXShare\COM</span><span class='tstring_end'>&#39;</span></span><span class='rparen'>)</span>
248
+ <span class='kw'>unless</span> <span class='const'>File</span><span class='period'>.</span><span class='id identifier rubyid_exists?'>exists?</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'>nlrc.exe</span><span class='tstring_end'>&#39;</span></span><span class='comma'>,</span> <span class='ivar'>@compiler_path</span><span class='rparen'>)</span>
249
+ <span class='comment'># ---------------------------------------------------------
250
+ </span> <span class='comment'># TODO: Check if the compiler was added to the system path.
251
+ </span> <span class='comment'># Execute system(&#39;nlrc&#39;).
252
+ </span> <span class='comment'># ---------------------------------------------------------
253
+ </span>
254
+ <span class='comment'># Compiler not found.
255
+ </span> <span class='id identifier rubyid_raise'>raise</span> <span class='const'>NetLinx</span><span class='op'>::</span><span class='const'>NoCompilerError</span><span class='comma'>,</span> <span class='tstring'><span class='tstring_beg'>&#39;</span><span class='tstring_content'>The NetLinx compiler (nlrc.exe) could not be found on the system.</span><span class='tstring_end'>&#39;</span></span>
256
+ <span class='kw'>end</span>
257
+ <span class='kw'>end</span>
258
+ <span class='kw'>end</span></pre>
259
+ </td>
260
+ </tr>
261
+ </table>
262
+ </div>
263
+
264
+ </div>
265
+
266
+
267
+ <div id="instance_method_details" class="method_details_list">
268
+ <h2>Instance Method Details</h2>
269
+
270
+
271
+ <div class="method_details first">
272
+ <h3 class="signature first" id="compile-instance_method">
273
+
274
+ - (<tt>Object</tt>) <strong>compile</strong>(compilable)
275
+
276
+
277
+
278
+
279
+
280
+ </h3><div class="docstring">
281
+ <div class="discussion">
282
+
283
+ <p>Compile the specified object with the NetLinx compiler. See
284
+ Test::NetLinx::Compilable.</p>
285
+
286
+
287
+ </div>
288
+ </div>
289
+ <div class="tags">
290
+
291
+
292
+ </div><table class="source_code">
293
+ <tr>
294
+ <td>
295
+ <pre class="lines">
296
+
297
+
298
+ 37
299
+ 38
300
+ 39
301
+ 40
302
+ 41
303
+ 42
304
+ 43
305
+ 44
306
+ 45
307
+ 46
308
+ 47
309
+ 48
310
+ 49
311
+ 50
312
+ 51
313
+ 52
314
+ 53
315
+ 54
316
+ 55
317
+ 56
318
+ 57
319
+ 58
320
+ 59
321
+ 60
322
+ 61
323
+ 62
324
+ 63
325
+ 64
326
+ 65
327
+ 66
328
+ 67
329
+ 68</pre>
330
+ </td>
331
+ <td>
332
+ <pre class="code"><span class="info file"># File 'lib/netlinx/compiler.rb', line 37</span>
333
+
334
+ <span class='kw'>def</span> <span class='id identifier rubyid_compile'>compile</span><span class='lparen'>(</span><span class='id identifier rubyid_compilable'>compilable</span><span class='rparen'>)</span>
335
+ <span class='id identifier rubyid_compiler'>compiler</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'>@compiler_exe</span><span class='comma'>,</span> <span class='ivar'>@compiler_path</span>
336
+ <span class='id identifier rubyid_result'>result</span> <span class='op'>=</span> <span class='lbracket'>[</span><span class='rbracket'>]</span>
117
337
 
118
- <li><a href="../Test/NetLinx/Compilable.html">Test::NetLinx::Compilable</a>
119
-
120
- <li><a href="../Test/NetLinx/Compile.html">Test::NetLinx::Compile</a>
121
-
122
- <li><a href="../Test/NetLinx/Compile/Discoverable.html">Test::NetLinx::Compile::Discoverable</a>
123
-
124
- <li><a href="../Test/NetLinx/Compile/Invokable.html">Test::NetLinx::Compile::Invokable</a>
125
-
126
- </ul>
127
- </nav>
128
-
129
- </div>
130
- </nav>
131
-
132
- <div id="documentation">
133
- <h1 class="class">class NetLinx::Compiler</h1>
134
-
135
- <div id="description" class="description">
136
-
137
- <p>A wrapper class for the AMX <a href="../NetLinx.html">NetLinx</a> compiler
138
- executable (nlrc.exe).</p>
139
-
140
- </div><!-- description -->
141
-
142
-
143
-
144
-
145
- <section id="5Buntitled-5D" class="documentation-section">
146
-
147
-
148
-
149
-
150
-
151
-
152
-
153
-
154
- <!-- Methods -->
155
-
156
- <section id="public-class-5Buntitled-5D-method-details" class="method-section section">
157
- <h3 class="section-header">Public Class Methods</h3>
158
-
159
-
160
- <div id="method-c-new" class="method-detail ">
161
-
162
- <div class="method-heading">
163
- <span class="method-name">new</span><span
164
- class="method-args">(**kvargs)</span>
165
-
166
- <span class="method-click-advice">click to toggle source</span>
167
-
168
- </div>
169
-
170
-
171
- <div class="method-description">
172
-
173
- <p>Checks for the AMX <a href="../NetLinx.html">NetLinx</a> compiler
174
- (third-party software, nlrc.exe) at the default installation path. This can
175
- be overridden by specifying :compiler_path.</p>
176
-
177
-
178
-
179
-
180
- <div class="method-source-code" id="new-source">
181
- <pre><span class="ruby-comment"># File lib/netlinx/compiler.rb, line 13</span>
182
- <span class="ruby-keyword">def</span> <span class="ruby-identifier">initialize</span>(<span class="ruby-operator">**</span><span class="ruby-identifier">kvargs</span>)
183
- <span class="ruby-ivar">@compiler_exe</span> = <span class="ruby-string">&#39;nlrc.exe&#39;</span>
184
-
185
- <span class="ruby-ivar">@compiler_path</span> = <span class="ruby-identifier">kvargs</span>.<span class="ruby-identifier">fetch</span> <span class="ruby-value">:compiler_path</span>,
186
- <span class="ruby-constant">File</span>.<span class="ruby-identifier">expand_path</span>(<span class="ruby-string">&#39;C:\Program Files (x86)\Common Files\AMXShare\COM&#39;</span>) <span class="ruby-comment"># 64-bit O/S path</span>
187
-
188
- <span class="ruby-comment"># Check for NetLinx compiler at :compiler_path or the 64-bit O/S path.</span>
189
- <span class="ruby-keyword">unless</span> <span class="ruby-constant">File</span>.<span class="ruby-identifier">exists?</span> <span class="ruby-constant">File</span>.<span class="ruby-identifier">expand_path</span>(<span class="ruby-string">&#39;nlrc.exe&#39;</span>, <span class="ruby-ivar">@compiler_path</span>)
190
- <span class="ruby-comment"># Compiler not found. Try 32-bit O/S path.</span>
191
- <span class="ruby-ivar">@compiler_path</span> = <span class="ruby-constant">File</span>.<span class="ruby-identifier">expand_path</span>(<span class="ruby-string">&#39;C:\Program Files\Common Files\AMXShare\COM&#39;</span>)
192
- <span class="ruby-keyword">unless</span> <span class="ruby-constant">File</span>.<span class="ruby-identifier">exists?</span> <span class="ruby-constant">File</span>.<span class="ruby-identifier">expand_path</span>(<span class="ruby-string">&#39;nlrc.exe&#39;</span>, <span class="ruby-ivar">@compiler_path</span>)
193
- <span class="ruby-comment"># ---------------------------------------------------------</span>
194
- <span class="ruby-comment"># TODO: Check if the compiler was added to the system path.</span>
195
- <span class="ruby-comment"># Execute system(&#39;nlrc&#39;).</span>
196
- <span class="ruby-comment"># ---------------------------------------------------------</span>
338
+ <span class='id identifier rubyid_compilable'>compilable</span><span class='period'>.</span><span class='id identifier rubyid_compiler_target_files'>compiler_target_files</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_target_file'>target_file</span><span class='op'>|</span>
339
+ <span class='comment'># Construct paths.
340
+ </span> <span class='id identifier rubyid_include_paths'>include_paths</span> <span class='op'>=</span> <span class='tstring'><span class='tstring_beg'>&quot;</span><span class='tstring_content'>-I</span><span class='embexpr_beg'>#{</span><span class='id identifier rubyid_compilable'>compilable</span><span class='period'>.</span><span class='id identifier rubyid_compiler_include_paths'>compiler_include_paths</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_end'>&quot;</span></span> <span class='kw'>unless</span>
341
+ <span class='id identifier rubyid_compilable'>compilable</span><span class='period'>.</span><span class='id identifier rubyid_compiler_include_paths'>compiler_include_paths</span><span class='period'>.</span><span class='id identifier rubyid_empty?'>empty?</span>
197
342
 
198
- <span class="ruby-comment"># Compiler not found.</span>
199
- <span class="ruby-identifier">raise</span> <span class="ruby-constant">NetLinx</span><span class="ruby-operator">::</span><span class="ruby-constant">NoCompilerError</span>, <span class="ruby-string">&#39;The NetLinx compiler (nlrc.exe) could not be found on the system.&#39;</span>
200
- <span class="ruby-keyword">end</span>
201
- <span class="ruby-keyword">end</span>
202
- <span class="ruby-keyword">end</span></pre>
203
- </div><!-- new-source -->
204
-
205
- </div>
206
-
207
-
208
-
209
-
210
- </div><!-- new-method -->
211
-
212
-
213
- </section><!-- public-class-method-details -->
214
-
215
- <section id="public-instance-5Buntitled-5D-method-details" class="method-section section">
216
- <h3 class="section-header">Public Instance Methods</h3>
217
-
218
-
219
- <div id="method-i-compile" class="method-detail ">
220
-
221
- <div class="method-heading">
222
- <span class="method-name">compile</span><span
223
- class="method-args">(compilable)</span>
224
-
225
- <span class="method-click-advice">click to toggle source</span>
226
-
227
- </div>
228
-
229
-
230
- <div class="method-description">
231
-
232
- <p><a href="Compile.html">Compile</a> the specified object with the <a
233
- href="../NetLinx.html">NetLinx</a> compiler. See <a
234
- href="../Test/NetLinx/Compilable.html">Test::NetLinx::Compilable</a>.</p>
235
-
236
-
237
-
238
-
239
- <div class="method-source-code" id="compile-source">
240
- <pre><span class="ruby-comment"># File lib/netlinx/compiler.rb, line 37</span>
241
- <span class="ruby-keyword">def</span> <span class="ruby-identifier">compile</span>(<span class="ruby-identifier">compilable</span>)
242
- <span class="ruby-identifier">compiler</span> = <span class="ruby-constant">File</span>.<span class="ruby-identifier">expand_path</span> <span class="ruby-ivar">@compiler_exe</span>, <span class="ruby-ivar">@compiler_path</span>
243
- <span class="ruby-identifier">result</span> = []
244
-
245
- <span class="ruby-identifier">compilable</span>.<span class="ruby-identifier">compiler_target_files</span>.<span class="ruby-identifier">each</span> <span class="ruby-keyword">do</span> <span class="ruby-operator">|</span><span class="ruby-identifier">target_file</span><span class="ruby-operator">|</span>
246
- <span class="ruby-comment"># Construct paths.</span>
247
- <span class="ruby-identifier">include_paths</span> = <span class="ruby-node">&quot;-I#{compilable.compiler_include_paths.join &#39;;&#39;}&quot;</span> <span class="ruby-keyword">unless</span>
248
- <span class="ruby-identifier">compilable</span>.<span class="ruby-identifier">compiler_include_paths</span>.<span class="ruby-identifier">empty?</span>
249
-
250
- <span class="ruby-identifier">module_paths</span> = <span class="ruby-node">&quot;-M#{compilable.compiler_module_paths.join &#39;;&#39;}&quot;</span> <span class="ruby-keyword">unless</span>
251
- <span class="ruby-identifier">compilable</span>.<span class="ruby-identifier">compiler_module_paths</span>.<span class="ruby-identifier">empty?</span>
343
+ <span class='id identifier rubyid_module_paths'>module_paths</span> <span class='op'>=</span> <span class='tstring'><span class='tstring_beg'>&quot;</span><span class='tstring_content'>-M</span><span class='embexpr_beg'>#{</span><span class='id identifier rubyid_compilable'>compilable</span><span class='period'>.</span><span class='id identifier rubyid_compiler_module_paths'>compiler_module_paths</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_end'>&quot;</span></span> <span class='kw'>unless</span>
344
+ <span class='id identifier rubyid_compilable'>compilable</span><span class='period'>.</span><span class='id identifier rubyid_compiler_module_paths'>compiler_module_paths</span><span class='period'>.</span><span class='id identifier rubyid_empty?'>empty?</span>
252
345
 
253
- <span class="ruby-identifier">library_paths</span> = <span class="ruby-node">&quot;-L#{compilable.compiler_library_paths.join &#39;;&#39;}&quot;</span> <span class="ruby-keyword">unless</span>
254
- <span class="ruby-identifier">compilable</span>.<span class="ruby-identifier">compiler_library_paths</span>.<span class="ruby-identifier">empty?</span>
346
+ <span class='id identifier rubyid_library_paths'>library_paths</span> <span class='op'>=</span> <span class='tstring'><span class='tstring_beg'>&quot;</span><span class='tstring_content'>-L</span><span class='embexpr_beg'>#{</span><span class='id identifier rubyid_compilable'>compilable</span><span class='period'>.</span><span class='id identifier rubyid_compiler_library_paths'>compiler_library_paths</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_end'>&quot;</span></span> <span class='kw'>unless</span>
347
+ <span class='id identifier rubyid_compilable'>compilable</span><span class='period'>.</span><span class='id identifier rubyid_compiler_library_paths'>compiler_library_paths</span><span class='period'>.</span><span class='id identifier rubyid_empty?'>empty?</span>
255
348
 
256
- <span class="ruby-comment"># Run the NetLinx compiler.</span>
257
- <span class="ruby-identifier">io</span> = <span class="ruby-constant">IO</span>.<span class="ruby-identifier">popen</span> <span class="ruby-node">&quot;\&quot;#{compiler}\&quot; \&quot;#{target_file}\&quot; \&quot;#{include_paths}\&quot; \&quot;#{module_paths}\&quot; \&quot;#{library_paths}\&quot;&quot;</span>
258
- <span class="ruby-identifier">stream</span> = <span class="ruby-identifier">io</span>.<span class="ruby-identifier">read</span>
259
- <span class="ruby-identifier">io</span>.<span class="ruby-identifier">close</span>
260
-
261
- <span class="ruby-comment"># Build the result.</span>
262
- <span class="ruby-identifier">result</span> <span class="ruby-operator">&lt;&lt;</span> <span class="ruby-constant">NetLinx</span><span class="ruby-operator">::</span><span class="ruby-constant">CompilerResult</span>.<span class="ruby-identifier">new</span>(
263
- <span class="ruby-identifier">compiler_target_files</span><span class="ruby-operator">:</span> [<span class="ruby-identifier">target_file</span>],
264
- <span class="ruby-identifier">compiler_include_paths</span><span class="ruby-operator">:</span> <span class="ruby-identifier">compilable</span>.<span class="ruby-identifier">compiler_include_paths</span>,
265
- <span class="ruby-identifier">compiler_module_paths</span><span class="ruby-operator">:</span> <span class="ruby-identifier">compilable</span>.<span class="ruby-identifier">compiler_module_paths</span>,
266
- <span class="ruby-identifier">compiler_library_paths</span><span class="ruby-operator">:</span> <span class="ruby-identifier">compilable</span>.<span class="ruby-identifier">compiler_library_paths</span>,
267
- <span class="ruby-identifier">stream</span><span class="ruby-operator">:</span> <span class="ruby-identifier">stream</span>
268
- )
269
- <span class="ruby-keyword">end</span>
270
-
271
- <span class="ruby-identifier">result</span>
272
- <span class="ruby-keyword">end</span></pre>
273
- </div><!-- compile-source -->
274
-
275
- </div>
276
-
277
-
278
-
279
-
280
- </div><!-- compile-method -->
281
-
349
+ <span class='comment'># Run the NetLinx compiler.
350
+ </span> <span class='id identifier rubyid_io'>io</span> <span class='op'>=</span> <span class='const'>IO</span><span class='period'>.</span><span class='id identifier rubyid_popen'>popen</span> <span class='tstring'><span class='tstring_beg'>&quot;</span><span class='tstring_content'>\&quot;</span><span class='embexpr_beg'>#{</span><span class='id identifier rubyid_compiler'>compiler</span><span class='embexpr_end'>}</span><span class='tstring_content'>\&quot; \&quot;</span><span class='embexpr_beg'>#{</span><span class='id identifier rubyid_target_file'>target_file</span><span class='embexpr_end'>}</span><span class='tstring_content'>\&quot; \&quot;</span><span class='embexpr_beg'>#{</span><span class='id identifier rubyid_include_paths'>include_paths</span><span class='embexpr_end'>}</span><span class='tstring_content'>\&quot; \&quot;</span><span class='embexpr_beg'>#{</span><span class='id identifier rubyid_module_paths'>module_paths</span><span class='embexpr_end'>}</span><span class='tstring_content'>\&quot; \&quot;</span><span class='embexpr_beg'>#{</span><span class='id identifier rubyid_library_paths'>library_paths</span><span class='embexpr_end'>}</span><span class='tstring_content'>\&quot;</span><span class='tstring_end'>&quot;</span></span>
351
+ <span class='id identifier rubyid_stream'>stream</span> <span class='op'>=</span> <span class='id identifier rubyid_io'>io</span><span class='period'>.</span><span class='id identifier rubyid_read'>read</span>
352
+ <span class='id identifier rubyid_io'>io</span><span class='period'>.</span><span class='id identifier rubyid_close'>close</span>
282
353
 
283
- </section><!-- public-instance-method-details -->
354
+ <span class='comment'># Build the result.
355
+ </span> <span class='id identifier rubyid_result'>result</span> <span class='op'>&lt;&lt;</span> <span class='const'>NetLinx</span><span class='op'>::</span><span class='const'>CompilerResult</span><span class='period'>.</span><span class='id identifier rubyid_new'>new</span><span class='lparen'>(</span>
356
+ <span class='label'>compiler_target_files:</span> <span class='lbracket'>[</span><span class='id identifier rubyid_target_file'>target_file</span><span class='rbracket'>]</span><span class='comma'>,</span>
357
+ <span class='label'>compiler_include_paths:</span> <span class='id identifier rubyid_compilable'>compilable</span><span class='period'>.</span><span class='id identifier rubyid_compiler_include_paths'>compiler_include_paths</span><span class='comma'>,</span>
358
+ <span class='label'>compiler_module_paths:</span> <span class='id identifier rubyid_compilable'>compilable</span><span class='period'>.</span><span class='id identifier rubyid_compiler_module_paths'>compiler_module_paths</span><span class='comma'>,</span>
359
+ <span class='label'>compiler_library_paths:</span> <span class='id identifier rubyid_compilable'>compilable</span><span class='period'>.</span><span class='id identifier rubyid_compiler_library_paths'>compiler_library_paths</span><span class='comma'>,</span>
360
+ <span class='label'>stream:</span> <span class='id identifier rubyid_stream'>stream</span>
361
+ <span class='rparen'>)</span>
362
+ <span class='kw'>end</span>
284
363
 
285
- </section><!-- 5Buntitled-5D -->
286
-
287
- </div><!-- documentation -->
288
-
289
-
290
- <footer id="validator-badges">
291
- <p><a href="http://validator.w3.org/check/referer">[Validate]</a>
292
- <p>Generated by <a href="https://github.com/rdoc/rdoc">RDoc</a> 4.0.1.
293
- <p>Generated with the <a href="http://deveiate.org/projects/Darkfish-Rdoc/">Darkfish Rdoc Generator</a> 3.
294
- </footer>
295
-
364
+ <span class='id identifier rubyid_result'>result</span>
365
+ <span class='kw'>end</span></pre>
366
+ </td>
367
+ </tr>
368
+ </table>
369
+ </div>
370
+
371
+ </div>
372
+
373
+ </div>
374
+
375
+ <div id="footer">
376
+ Generated on Mon Jan 26 15:35:28 2015 by
377
+ <a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
378
+ 0.8.7.6 (ruby-2.1.5).
379
+ </div>
380
+
381
+ </body>
382
+ </html>