akaer 1.5.8 → 2.0.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -0,0 +1,365 @@
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
+ Module: Akaer::ApplicationMethods::General
8
+
9
+ &mdash; Documentation by YARD 0.8.4.1
10
+
11
+ </title>
12
+
13
+ <link rel="stylesheet" href="../../css/style.css" type="text/css" media="screen" charset="utf-8" />
14
+
15
+ <link rel="stylesheet" href="../../css/common.css" type="text/css" media="screen" 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#!" + escape(window.location.href);
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 (G)</a> &raquo;
35
+ <span class='title'><span class='object_link'><a href="../../Akaer.html" title="Akaer (module)">Akaer</a></span></span> &raquo; <span class='title'><span class='object_link'><a href="../ApplicationMethods.html" title="Akaer::ApplicationMethods (module)">ApplicationMethods</a></span></span>
36
+ &raquo;
37
+ <span class="title">General</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>Module: Akaer::ApplicationMethods::General
67
+
68
+
69
+
70
+ </h1>
71
+
72
+ <dl class="box">
73
+
74
+
75
+
76
+ <dt class="r1">Extended by:</dt>
77
+ <dd class="r1">ActiveSupport::Concern</dd>
78
+
79
+
80
+
81
+
82
+
83
+
84
+ <dt class="r2">Included in:</dt>
85
+ <dd class="r2"><span class='object_link'><a href="../Application.html" title="Akaer::Application (class)">Akaer::Application</a></span></dd>
86
+
87
+
88
+
89
+ <dt class="r1 last">Defined in:</dt>
90
+ <dd class="r1 last">lib/akaer/application.rb</dd>
91
+
92
+ </dl>
93
+ <div class="clear"></div>
94
+
95
+ <h2>Overview</h2><div class="docstring">
96
+ <div class="discussion">
97
+ <p>General methods.</p>
98
+
99
+
100
+ </div>
101
+ </div>
102
+ <div class="tags">
103
+
104
+
105
+ </div>
106
+
107
+
108
+
109
+
110
+
111
+
112
+
113
+ <h2>
114
+ Instance Method Summary
115
+ <small>(<a href="#" class="summary_toggle">collapse</a>)</small>
116
+ </h2>
117
+
118
+ <ul class="summary">
119
+
120
+ <li class="public ">
121
+ <span class="summary_signature">
122
+
123
+ <a href="#is_osx%3F-instance_method" title="#is_osx? (instance method)">- (Boolean) <strong>is_osx?</strong> </a>
124
+
125
+
126
+
127
+ </span>
128
+
129
+
130
+
131
+
132
+
133
+
134
+
135
+
136
+
137
+ <span class="summary_desc"><div class='inline'><p>Checks if we are running on MacOS X.</p>
138
+ </div></span>
139
+
140
+ </li>
141
+
142
+
143
+ <li class="public ">
144
+ <span class="summary_signature">
145
+
146
+ <a href="#manage-instance_method" title="#manage (instance method)">- (Boolean) <strong>manage</strong>(type, address) </a>
147
+
148
+
149
+
150
+ </span>
151
+
152
+
153
+
154
+
155
+
156
+
157
+
158
+
159
+
160
+ <span class="summary_desc"><div class='inline'><p>Adds or removes an alias from the interface.</p>
161
+ </div></span>
162
+
163
+ </li>
164
+
165
+
166
+ </ul>
167
+
168
+
169
+
170
+
171
+
172
+ <div id="instance_method_details" class="method_details_list">
173
+ <h2>Instance Method Details</h2>
174
+
175
+
176
+ <div class="method_details first">
177
+ <h3 class="signature first" id="is_osx?-instance_method">
178
+
179
+ - (<tt>Boolean</tt>) <strong>is_osx?</strong>
180
+
181
+
182
+
183
+
184
+
185
+ </h3><div class="docstring">
186
+ <div class="discussion">
187
+ <p>Checks if we are running on MacOS X.</p>
188
+
189
+ <p>System services are only available on that platform.</p>
190
+
191
+
192
+ </div>
193
+ </div>
194
+ <div class="tags">
195
+
196
+ <p class="tag_title">Returns:</p>
197
+ <ul class="return">
198
+
199
+ <li>
200
+
201
+
202
+ <span class='type'>(<tt>Boolean</tt>)</span>
203
+
204
+
205
+
206
+ &mdash;
207
+ <div class='inline'><p><code>true</code> if the current platform is MacOS X, <code>false</code> otherwise.</p>
208
+ </div>
209
+
210
+ </li>
211
+
212
+ </ul>
213
+
214
+ </div><table class="source_code">
215
+ <tr>
216
+ <td>
217
+ <pre class="lines">
218
+
219
+
220
+ 20
221
+ 21
222
+ 22</pre>
223
+ </td>
224
+ <td>
225
+ <pre class="code"><span class="info file"># File 'lib/akaer/application.rb', line 20</span>
226
+
227
+ <span class='kw'>def</span> <span class='id identifier rubyid_is_osx?'>is_osx?</span>
228
+ <span class='op'>::</span><span class='const'>RbConfig</span><span class='op'>::</span><span class='const'>CONFIG</span><span class='lbracket'>[</span><span class='tstring'><span class='tstring_beg'>'</span><span class='tstring_content'>host_os</span><span class='tstring_end'>'</span></span><span class='rbracket'>]</span> <span class='op'>=~</span> <span class='tstring'><span class='regexp_beg'>/</span><span class='tstring_content'>^darwin</span><span class='regexp_end'>/</span></span>
229
+ <span class='kw'>end</span></pre>
230
+ </td>
231
+ </tr>
232
+ </table>
233
+ </div>
234
+
235
+ <div class="method_details ">
236
+ <h3 class="signature " id="manage-instance_method">
237
+
238
+ - (<tt>Boolean</tt>) <strong>manage</strong>(type, address)
239
+
240
+
241
+
242
+
243
+
244
+ </h3><div class="docstring">
245
+ <div class="discussion">
246
+ <p>Adds or removes an alias from the interface.</p>
247
+
248
+
249
+ </div>
250
+ </div>
251
+ <div class="tags">
252
+ <p class="tag_title">Parameters:</p>
253
+ <ul class="param">
254
+
255
+ <li>
256
+
257
+ <span class='name'>type</span>
258
+
259
+
260
+ <span class='type'>(<tt>Symbol</tt>)</span>
261
+
262
+
263
+
264
+ &mdash;
265
+ <div class='inline'><p>The operation to execute. Can be <code>:add</code> or <code>:remove</code>.</p>
266
+ </div>
267
+
268
+ </li>
269
+
270
+ <li>
271
+
272
+ <span class='name'>address</span>
273
+
274
+
275
+ <span class='type'>(<tt>String</tt>)</span>
276
+
277
+
278
+
279
+ &mdash;
280
+ <div class='inline'><p>The address to manage.</p>
281
+ </div>
282
+
283
+ </li>
284
+
285
+ </ul>
286
+
287
+ <p class="tag_title">Returns:</p>
288
+ <ul class="return">
289
+
290
+ <li>
291
+
292
+
293
+ <span class='type'>(<tt>Boolean</tt>)</span>
294
+
295
+
296
+
297
+ &mdash;
298
+ <div class='inline'><p><code>true</code> if operation succedeed, <code>false</code> otherwise.</p>
299
+ </div>
300
+
301
+ </li>
302
+
303
+ </ul>
304
+
305
+ </div><table class="source_code">
306
+ <tr>
307
+ <td>
308
+ <pre class="lines">
309
+
310
+
311
+ 29
312
+ 30
313
+ 31
314
+ 32
315
+ 33
316
+ 34
317
+ 35
318
+ 36
319
+ 37
320
+ 38
321
+ 39
322
+ 40
323
+ 41
324
+ 42
325
+ 43
326
+ 44
327
+ 45</pre>
328
+ </td>
329
+ <td>
330
+ <pre class="code"><span class="info file"># File 'lib/akaer/application.rb', line 29</span>
331
+
332
+ <span class='kw'>def</span> <span class='id identifier rubyid_manage'>manage</span><span class='lparen'>(</span><span class='id identifier rubyid_type'>type</span><span class='comma'>,</span> <span class='id identifier rubyid_address'>address</span><span class='rparen'>)</span>
333
+ <span class='id identifier rubyid_locale'>locale</span> <span class='op'>=</span> <span class='kw'>self</span><span class='period'>.</span><span class='id identifier rubyid_i18n'>i18n</span>
334
+ <span class='id identifier rubyid_config'>config</span> <span class='op'>=</span> <span class='kw'>self</span><span class='period'>.</span><span class='id identifier rubyid_config'>config</span>
335
+ <span class='id identifier rubyid_quiet'>quiet</span> <span class='op'>=</span> <span class='id identifier rubyid_config'>config</span><span class='period'>.</span><span class='id identifier rubyid_quiet'>quiet</span>
336
+ <span class='id identifier rubyid_rv'>rv</span><span class='comma'>,</span> <span class='id identifier rubyid_command'>command</span><span class='comma'>,</span> <span class='id identifier rubyid_prefix'>prefix</span> <span class='op'>=</span> <span class='id identifier rubyid_setup_management'>setup_management</span><span class='lparen'>(</span><span class='id identifier rubyid_type'>type</span><span class='comma'>,</span> <span class='id identifier rubyid_address'>address</span><span class='rparen'>)</span>
337
+
338
+ <span class='comment'># Now execute
339
+ </span> <span class='kw'>if</span> <span class='id identifier rubyid_rv'>rv</span> <span class='kw'>then</span>
340
+ <span class='kw'>if</span> <span class='op'>!</span><span class='id identifier rubyid_config'>config</span><span class='period'>.</span><span class='id identifier rubyid_dry_run'>dry_run</span> <span class='kw'>then</span>
341
+ <span class='id identifier rubyid_execute_manage'>execute_manage</span><span class='lparen'>(</span><span class='id identifier rubyid_command'>command</span><span class='comma'>,</span> <span class='id identifier rubyid_prefix'>prefix</span><span class='comma'>,</span> <span class='id identifier rubyid_type'>type</span><span class='comma'>,</span> <span class='id identifier rubyid_address'>address</span><span class='comma'>,</span> <span class='id identifier rubyid_config'>config</span><span class='comma'>,</span> <span class='id identifier rubyid_quiet'>quiet</span><span class='rparen'>)</span>
342
+ <span class='kw'>else</span>
343
+ <span class='id identifier rubyid_log_management'>log_management</span><span class='lparen'>(</span><span class='symbol'>:dry_run</span><span class='comma'>,</span> <span class='id identifier rubyid_prefix'>prefix</span><span class='comma'>,</span> <span class='id identifier rubyid_type'>type</span><span class='comma'>,</span> <span class='id identifier rubyid_locale'>locale</span><span class='period'>.</span><span class='id identifier rubyid_remove'>remove</span><span class='comma'>,</span> <span class='id identifier rubyid_locale'>locale</span><span class='period'>.</span><span class='id identifier rubyid_add'>add</span><span class='comma'>,</span> <span class='id identifier rubyid_address'>address</span><span class='comma'>,</span> <span class='id identifier rubyid_config'>config</span><span class='comma'>,</span> <span class='id identifier rubyid_quiet'>quiet</span><span class='rparen'>)</span>
344
+ <span class='kw'>end</span>
345
+ <span class='kw'>end</span>
346
+
347
+ <span class='id identifier rubyid_rv'>rv</span>
348
+ <span class='kw'>end</span></pre>
349
+ </td>
350
+ </tr>
351
+ </table>
352
+ </div>
353
+
354
+ </div>
355
+
356
+ </div>
357
+
358
+ <div id="footer">
359
+ Generated on Sat Feb 9 17:30:34 2013 by
360
+ <a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
361
+ 0.8.4.1 (ruby-1.9.3).
362
+ </div>
363
+
364
+ </body>
365
+ </html>