akaer 1.5.2 → 1.5.3

Sign up to get free protection for your applications and to get access to all the features.
data/README.md CHANGED
@@ -2,6 +2,7 @@
2
2
 
3
3
  [![Build Status](https://secure.travis-ci.org/ShogunPanda/akaer.png?branch=master)](http://travis-ci.org/ShogunPanda/akaer)
4
4
  [![Dependency Status](https://gemnasium.com/ShogunPanda/akaer.png?travis)](https://gemnasium.com/ShogunPanda/akaer)
5
+ [![Code Climate](https://codeclimate.com/badge.png)](https://codeclimate.com/github/ShogunPanda/akaer)
5
6
 
6
7
  A small utility to add aliases to network interfaces.
7
8
 
data/akaer.gemspec CHANGED
@@ -21,7 +21,7 @@ Gem::Specification.new do |gem|
21
21
  gem.executables = `git ls-files -- bin/*`.split("\n").map{ |f| File.basename(f) }
22
22
  gem.require_paths = ["lib"]
23
23
 
24
- gem.add_dependency("mamertes", ">= 1.1.0")
24
+ gem.add_dependency("mamertes", ">= 1.1.7")
25
25
 
26
26
  gem.add_development_dependency("rspec", "~> 2.11.0")
27
27
  gem.add_development_dependency("rake", "~> 0.9.0")
data/doc/Akaer.html CHANGED
@@ -121,9 +121,9 @@ Licensed under the MIT license, which can be found at <a href="http://www.openso
121
121
  </div>
122
122
 
123
123
  <div id="footer">
124
- Generated on Wed Aug 22 10:39:50 2012 by
124
+ Generated on Sat Oct 6 08:55:19 2012 by
125
125
  <a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
126
- 0.8.2.1 (ruby-1.9.2).
126
+ 0.8.2.1 (ruby-1.8.7).
127
127
  </div>
128
128
 
129
129
  </body>
@@ -655,40 +655,41 @@
655
655
  <td>
656
656
  <pre class="code"><span class="info file"># File 'lib/akaer/application.rb', line 23</span>
657
657
 
658
- <span class='kw'>def</span> <span class='id identifier rubyid_initialize'>initialize</span><span class='lparen'>(</span><span class='id identifier rubyid_command'>command</span><span class='rparen'>)</span>
659
- <span class='ivar'>@command</span> <span class='op'>=</span> <span class='id identifier rubyid_command'>command</span>
660
- <span class='id identifier rubyid_application'>application</span> <span class='op'>=</span> <span class='ivar'>@command</span><span class='period'>.</span><span class='id identifier rubyid_application'>application</span>
661
-
662
- <span class='comment'># Setup logger
663
- </span> <span class='const'>Bovem</span><span class='op'>::</span><span class='const'>Logger</span><span class='period'>.</span><span class='id identifier rubyid_start_time'>start_time</span> <span class='op'>=</span> <span class='const'>Time</span><span class='period'>.</span><span class='id identifier rubyid_now'>now</span>
664
- <span class='ivar'>@logger</span> <span class='op'>=</span> <span class='const'>Bovem</span><span class='op'>::</span><span class='const'>Logger</span><span class='period'>.</span><span class='id identifier rubyid_create'>create</span><span class='lparen'>(</span><span class='const'>Bovem</span><span class='op'>::</span><span class='const'>Logger</span><span class='period'>.</span><span class='id identifier rubyid_get_real_file'>get_real_file</span><span class='lparen'>(</span><span class='id identifier rubyid_application'>application</span><span class='period'>.</span><span class='id identifier rubyid_options'>options</span><span class='lbracket'>[</span><span class='tstring'><span class='tstring_beg'>&quot;</span><span class='tstring_content'>log-file</span><span class='tstring_end'>&quot;</span></span><span class='rbracket'>]</span><span class='period'>.</span><span class='id identifier rubyid_value'>value</span><span class='rparen'>)</span> <span class='op'>||</span> <span class='const'>Bovem</span><span class='op'>::</span><span class='const'>Logger</span><span class='period'>.</span><span class='id identifier rubyid_default_file'>default_file</span><span class='comma'>,</span> <span class='const'>Logger</span><span class='op'>::</span><span class='const'>INFO</span><span class='rparen'>)</span>
665
-
666
- <span class='comment'># Open configuration
667
- </span> <span class='kw'>begin</span>
668
- <span class='id identifier rubyid_overrides'>overrides</span> <span class='op'>=</span> <span class='lbrace'>{</span>
669
- <span class='symbol'>:interface</span> <span class='op'>=&gt;</span> <span class='id identifier rubyid_application'>application</span><span class='period'>.</span><span class='id identifier rubyid_options'>options</span><span class='lbracket'>[</span><span class='tstring'><span class='tstring_beg'>&quot;</span><span class='tstring_content'>interface</span><span class='tstring_end'>&quot;</span></span><span class='rbracket'>]</span><span class='period'>.</span><span class='id identifier rubyid_value'>value</span><span class='comma'>,</span>
670
- <span class='symbol'>:addresses</span> <span class='op'>=&gt;</span> <span class='id identifier rubyid_application'>application</span><span class='period'>.</span><span class='id identifier rubyid_options'>options</span><span class='lbracket'>[</span><span class='tstring'><span class='tstring_beg'>&quot;</span><span class='tstring_content'>addresses</span><span class='tstring_end'>&quot;</span></span><span class='rbracket'>]</span><span class='period'>.</span><span class='id identifier rubyid_value'>value</span><span class='comma'>,</span>
671
- <span class='symbol'>:start_address</span> <span class='op'>=&gt;</span> <span class='id identifier rubyid_application'>application</span><span class='period'>.</span><span class='id identifier rubyid_options'>options</span><span class='lbracket'>[</span><span class='tstring'><span class='tstring_beg'>&quot;</span><span class='tstring_content'>start-address</span><span class='tstring_end'>&quot;</span></span><span class='rbracket'>]</span><span class='period'>.</span><span class='id identifier rubyid_value'>value</span><span class='comma'>,</span>
672
- <span class='symbol'>:aliases</span> <span class='op'>=&gt;</span> <span class='id identifier rubyid_application'>application</span><span class='period'>.</span><span class='id identifier rubyid_options'>options</span><span class='lbracket'>[</span><span class='tstring'><span class='tstring_beg'>&quot;</span><span class='tstring_content'>aliases</span><span class='tstring_end'>&quot;</span></span><span class='rbracket'>]</span><span class='period'>.</span><span class='id identifier rubyid_value'>value</span><span class='comma'>,</span>
673
- <span class='symbol'>:add_command</span> <span class='op'>=&gt;</span> <span class='id identifier rubyid_application'>application</span><span class='period'>.</span><span class='id identifier rubyid_options'>options</span><span class='lbracket'>[</span><span class='tstring'><span class='tstring_beg'>&quot;</span><span class='tstring_content'>add-command</span><span class='tstring_end'>&quot;</span></span><span class='rbracket'>]</span><span class='period'>.</span><span class='id identifier rubyid_value'>value</span><span class='comma'>,</span>
674
- <span class='symbol'>:remove_command</span> <span class='op'>=&gt;</span> <span class='id identifier rubyid_application'>application</span><span class='period'>.</span><span class='id identifier rubyid_options'>options</span><span class='lbracket'>[</span><span class='tstring'><span class='tstring_beg'>&quot;</span><span class='tstring_content'>remove-command</span><span class='tstring_end'>&quot;</span></span><span class='rbracket'>]</span><span class='period'>.</span><span class='id identifier rubyid_value'>value</span><span class='comma'>,</span>
675
- <span class='symbol'>:log_file</span> <span class='op'>=&gt;</span> <span class='id identifier rubyid_application'>application</span><span class='period'>.</span><span class='id identifier rubyid_options'>options</span><span class='lbracket'>[</span><span class='tstring'><span class='tstring_beg'>&quot;</span><span class='tstring_content'>log-file</span><span class='tstring_end'>&quot;</span></span><span class='rbracket'>]</span><span class='period'>.</span><span class='id identifier rubyid_value'>value</span><span class='comma'>,</span>
676
- <span class='symbol'>:log_level</span> <span class='op'>=&gt;</span> <span class='id identifier rubyid_application'>application</span><span class='period'>.</span><span class='id identifier rubyid_options'>options</span><span class='lbracket'>[</span><span class='tstring'><span class='tstring_beg'>&quot;</span><span class='tstring_content'>log-level</span><span class='tstring_end'>&quot;</span></span><span class='rbracket'>]</span><span class='period'>.</span><span class='id identifier rubyid_value'>value</span><span class='comma'>,</span>
677
- <span class='symbol'>:dry_run</span> <span class='op'>=&gt;</span> <span class='id identifier rubyid_application'>application</span><span class='period'>.</span><span class='id identifier rubyid_options'>options</span><span class='lbracket'>[</span><span class='tstring'><span class='tstring_beg'>&quot;</span><span class='tstring_content'>dry-run</span><span class='tstring_end'>&quot;</span></span><span class='rbracket'>]</span><span class='period'>.</span><span class='id identifier rubyid_value'>value</span><span class='comma'>,</span>
678
- <span class='symbol'>:quiet</span> <span class='op'>=&gt;</span> <span class='id identifier rubyid_application'>application</span><span class='period'>.</span><span class='id identifier rubyid_options'>options</span><span class='lbracket'>[</span><span class='tstring'><span class='tstring_beg'>&quot;</span><span class='tstring_content'>quiet</span><span class='tstring_end'>&quot;</span></span><span class='rbracket'>]</span><span class='period'>.</span><span class='id identifier rubyid_value'>value</span>
679
- <span class='rbrace'>}</span><span class='period'>.</span><span class='id identifier rubyid_reject'>reject</span> <span class='lbrace'>{</span><span class='op'>|</span><span class='id identifier rubyid_k'>k</span><span class='comma'>,</span><span class='id identifier rubyid_v'>v</span><span class='op'>|</span> <span class='id identifier rubyid_v'>v</span><span class='period'>.</span><span class='id identifier rubyid_nil?'>nil?</span> <span class='rbrace'>}</span>
680
-
681
- <span class='ivar'>@config</span> <span class='op'>=</span> <span class='const'>Akaer</span><span class='op'>::</span><span class='const'>Configuration</span><span class='period'>.</span><span class='id identifier rubyid_new'>new</span><span class='lparen'>(</span><span class='id identifier rubyid_application'>application</span><span class='period'>.</span><span class='id identifier rubyid_options'>options</span><span class='lbracket'>[</span><span class='tstring'><span class='tstring_beg'>&quot;</span><span class='tstring_content'>configuration</span><span class='tstring_end'>&quot;</span></span><span class='rbracket'>]</span><span class='period'>.</span><span class='id identifier rubyid_value'>value</span><span class='comma'>,</span> <span class='id identifier rubyid_overrides'>overrides</span><span class='comma'>,</span> <span class='ivar'>@logger</span><span class='rparen'>)</span>
682
-
683
- <span class='ivar'>@logger</span> <span class='op'>=</span> <span class='kw'>nil</span>
684
- <span class='ivar'>@logger</span> <span class='op'>=</span> <span class='kw'>self</span><span class='period'>.</span><span class='id identifier rubyid_get_logger'>get_logger</span>
685
- <span class='kw'>rescue</span> <span class='const'>Bovem</span><span class='op'>::</span><span class='const'>Errors</span><span class='op'>::</span><span class='const'>InvalidConfiguration</span> <span class='op'>=&gt;</span> <span class='id identifier rubyid_e'>e</span>
686
- <span class='ivar'>@logger</span> <span class='op'>?</span> <span class='ivar'>@logger</span><span class='period'>.</span><span class='id identifier rubyid_fatal'>fatal</span><span class='lparen'>(</span><span class='id identifier rubyid_e'>e</span><span class='period'>.</span><span class='id identifier rubyid_message'>message</span><span class='rparen'>)</span> <span class='op'>:</span> <span class='const'>Bovem</span><span class='op'>::</span><span class='const'>Logger</span><span class='period'>.</span><span class='id identifier rubyid_create'>create</span><span class='lparen'>(</span><span class='tstring'><span class='tstring_beg'>&quot;</span><span class='tstring_content'>STDERR</span><span class='tstring_end'>&quot;</span></span><span class='rparen'>)</span><span class='period'>.</span><span class='id identifier rubyid_fatal'>fatal</span><span class='lparen'>(</span><span class='tstring'><span class='tstring_beg'>&quot;</span><span class='tstring_content'>Cannot log to {mark=bright}</span><span class='embexpr_beg'>#{</span><span class='id identifier rubyid_config'>config</span><span class='period'>.</span><span class='id identifier rubyid_log_file'>log_file</span><span class='rbrace'>}</span><span class='tstring_content'>{/mark}. Exiting...</span><span class='tstring_end'>&quot;</span></span><span class='rparen'>)</span>
687
- <span class='id identifier rubyid_raise'>raise</span> <span class='op'>::</span><span class='const'>SystemExit</span>
688
- <span class='kw'>end</span>
689
-
690
- <span class='kw'>self</span>
691
- <span class='kw'>end</span></pre>
658
+ <span class='rubyid_def def kw'>def</span> <span class='rubyid_initialize identifier id'>initialize</span><span class='lparen token'>(</span><span class='rubyid_command identifier id'>command</span><span class='rparen token'>)</span>
659
+ <span class='rubyid_@command ivar id'>@command</span> <span class='assign token'>=</span> <span class='rubyid_command identifier id'>command</span>
660
+ <span class='rubyid_application identifier id'>application</span> <span class='assign token'>=</span> <span class='rubyid_@command ivar id'>@command</span><span class='dot token'>.</span><span class='rubyid_application identifier id'>application</span>
661
+
662
+ <span class='comment val'># Setup logger</span>
663
+ <span class='rubyid_Bovem constant id'>Bovem</span><span class='colon2 op'>::</span><span class='rubyid_Logger constant id'>Logger</span><span class='dot token'>.</span><span class='rubyid_start_time identifier id'>start_time</span> <span class='assign token'>=</span> <span class='rubyid_Time constant id'>Time</span><span class='dot token'>.</span><span class='rubyid_now identifier id'>now</span>
664
+ <span class='rubyid_@logger ivar id'>@logger</span> <span class='assign token'>=</span> <span class='rubyid_Bovem constant id'>Bovem</span><span class='colon2 op'>::</span><span class='rubyid_Logger constant id'>Logger</span><span class='dot token'>.</span><span class='rubyid_create identifier id'>create</span><span class='lparen token'>(</span><span class='rubyid_Bovem constant id'>Bovem</span><span class='colon2 op'>::</span><span class='rubyid_Logger constant id'>Logger</span><span class='dot token'>.</span><span class='rubyid_get_real_file identifier id'>get_real_file</span><span class='lparen token'>(</span><span class='rubyid_application identifier id'>application</span><span class='dot token'>.</span><span class='rubyid_options identifier id'>options</span><span class='lbrack token'>[</span><span class='string val'>&quot;log-file&quot;</span><span class='rbrack token'>]</span><span class='dot token'>.</span><span class='rubyid_value identifier id'>value</span><span class='rparen token'>)</span> <span class='orop op'>||</span> <span class='rubyid_Bovem constant id'>Bovem</span><span class='colon2 op'>::</span><span class='rubyid_Logger constant id'>Logger</span><span class='dot token'>.</span><span class='rubyid_default_file identifier id'>default_file</span><span class='comma token'>,</span> <span class='rubyid_Logger constant id'>Logger</span><span class='colon2 op'>::</span><span class='rubyid_INFO constant id'>INFO</span><span class='rparen token'>)</span>
665
+
666
+ <span class='comment val'># Open configuration</span>
667
+ <span class='rubyid_begin begin kw'>begin</span>
668
+ <span class='rubyid_overrides identifier id'>overrides</span> <span class='assign token'>=</span> <span class='lbrace token'>{</span>
669
+ <span class='symbol val'>:interface</span> <span class='assign token'>=</span><span class='gt op'>&gt;</span> <span class='rubyid_application identifier id'>application</span><span class='dot token'>.</span><span class='rubyid_options identifier id'>options</span><span class='lbrack token'>[</span><span class='string val'>&quot;interface&quot;</span><span class='rbrack token'>]</span><span class='dot token'>.</span><span class='rubyid_value identifier id'>value</span><span class='comma token'>,</span>
670
+ <span class='symbol val'>:addresses</span> <span class='assign token'>=</span><span class='gt op'>&gt;</span> <span class='rubyid_application identifier id'>application</span><span class='dot token'>.</span><span class='rubyid_options identifier id'>options</span><span class='lbrack token'>[</span><span class='string val'>&quot;addresses&quot;</span><span class='rbrack token'>]</span><span class='dot token'>.</span><span class='rubyid_value identifier id'>value</span><span class='comma token'>,</span>
671
+ <span class='symbol val'>:start_address</span> <span class='assign token'>=</span><span class='gt op'>&gt;</span> <span class='rubyid_application identifier id'>application</span><span class='dot token'>.</span><span class='rubyid_options identifier id'>options</span><span class='lbrack token'>[</span><span class='string val'>&quot;start-address&quot;</span><span class='rbrack token'>]</span><span class='dot token'>.</span><span class='rubyid_value identifier id'>value</span><span class='comma token'>,</span>
672
+ <span class='symbol val'>:aliases</span> <span class='assign token'>=</span><span class='gt op'>&gt;</span> <span class='rubyid_application identifier id'>application</span><span class='dot token'>.</span><span class='rubyid_options identifier id'>options</span><span class='lbrack token'>[</span><span class='string val'>&quot;aliases&quot;</span><span class='rbrack token'>]</span><span class='dot token'>.</span><span class='rubyid_value identifier id'>value</span><span class='comma token'>,</span>
673
+ <span class='symbol val'>:add_command</span> <span class='assign token'>=</span><span class='gt op'>&gt;</span> <span class='rubyid_application identifier id'>application</span><span class='dot token'>.</span><span class='rubyid_options identifier id'>options</span><span class='lbrack token'>[</span><span class='string val'>&quot;add-command&quot;</span><span class='rbrack token'>]</span><span class='dot token'>.</span><span class='rubyid_value identifier id'>value</span><span class='comma token'>,</span>
674
+ <span class='symbol val'>:remove_command</span> <span class='assign token'>=</span><span class='gt op'>&gt;</span> <span class='rubyid_application identifier id'>application</span><span class='dot token'>.</span><span class='rubyid_options identifier id'>options</span><span class='lbrack token'>[</span><span class='string val'>&quot;remove-command&quot;</span><span class='rbrack token'>]</span><span class='dot token'>.</span><span class='rubyid_value identifier id'>value</span><span class='comma token'>,</span>
675
+ <span class='symbol val'>:log_file</span> <span class='assign token'>=</span><span class='gt op'>&gt;</span> <span class='rubyid_application identifier id'>application</span><span class='dot token'>.</span><span class='rubyid_options identifier id'>options</span><span class='lbrack token'>[</span><span class='string val'>&quot;log-file&quot;</span><span class='rbrack token'>]</span><span class='dot token'>.</span><span class='rubyid_value identifier id'>value</span><span class='comma token'>,</span>
676
+ <span class='symbol val'>:log_level</span> <span class='assign token'>=</span><span class='gt op'>&gt;</span> <span class='rubyid_application identifier id'>application</span><span class='dot token'>.</span><span class='rubyid_options identifier id'>options</span><span class='lbrack token'>[</span><span class='string val'>&quot;log-level&quot;</span><span class='rbrack token'>]</span><span class='dot token'>.</span><span class='rubyid_value identifier id'>value</span><span class='comma token'>,</span>
677
+ <span class='symbol val'>:dry_run</span> <span class='assign token'>=</span><span class='gt op'>&gt;</span> <span class='rubyid_application identifier id'>application</span><span class='dot token'>.</span><span class='rubyid_options identifier id'>options</span><span class='lbrack token'>[</span><span class='string val'>&quot;dry-run&quot;</span><span class='rbrack token'>]</span><span class='dot token'>.</span><span class='rubyid_value identifier id'>value</span><span class='comma token'>,</span>
678
+ <span class='symbol val'>:quiet</span> <span class='assign token'>=</span><span class='gt op'>&gt;</span> <span class='rubyid_application identifier id'>application</span><span class='dot token'>.</span><span class='rubyid_options identifier id'>options</span><span class='lbrack token'>[</span><span class='string val'>&quot;quiet&quot;</span><span class='rbrack token'>]</span><span class='dot token'>.</span><span class='rubyid_value identifier id'>value</span>
679
+ <span class='rbrace token'>}</span><span class='dot token'>.</span><span class='rubyid_reject identifier id'>reject</span> <span class='lbrace token'>{</span><span class='bitor op'>|</span><span class='rubyid_k identifier id'>k</span><span class='comma token'>,</span><span class='rubyid_v identifier id'>v</span><span class='bitor op'>|</span> <span class='rubyid_v identifier id'>v</span><span class='dot token'>.</span><span class='rubyid_nil? fid id'>nil?</span> <span class='rbrace token'>}</span>
680
+
681
+ <span class='rubyid_@config ivar id'>@config</span> <span class='assign token'>=</span> <span class='rubyid_Akaer constant id'>Akaer</span><span class='colon2 op'>::</span><span class='rubyid_Configuration constant id'>Configuration</span><span class='dot token'>.</span><span class='rubyid_new identifier id'>new</span><span class='lparen token'>(</span><span class='rubyid_application identifier id'>application</span><span class='dot token'>.</span><span class='rubyid_options identifier id'>options</span><span class='lbrack token'>[</span><span class='string val'>&quot;configuration&quot;</span><span class='rbrack token'>]</span><span class='dot token'>.</span><span class='rubyid_value identifier id'>value</span><span class='comma token'>,</span> <span class='rubyid_overrides identifier id'>overrides</span><span class='comma token'>,</span> <span class='rubyid_@logger ivar id'>@logger</span><span class='rparen token'>)</span>
682
+
683
+ <span class='rubyid_@logger ivar id'>@logger</span> <span class='assign token'>=</span> <span class='rubyid_nil nil kw'>nil</span>
684
+ <span class='rubyid_@logger ivar id'>@logger</span> <span class='assign token'>=</span> <span class='rubyid_self self kw'>self</span><span class='dot token'>.</span><span class='rubyid_get_logger identifier id'>get_logger</span>
685
+ <span class='rubyid_rescue rescue kw'>rescue</span> <span class='rubyid_Bovem constant id'>Bovem</span><span class='colon2 op'>::</span><span class='rubyid_Errors constant id'>Errors</span><span class='colon2 op'>::</span><span class='rubyid_InvalidConfiguration constant id'>InvalidConfiguration</span> <span class='assign token'>=</span><span class='gt op'>&gt;</span> <span class='rubyid_e identifier id'>e</span>
686
+ <span class='rubyid_@logger ivar id'>@logger</span> <span class='question op'>?</span> <span class='rubyid_@logger ivar id'>@logger</span><span class='dot token'>.</span><span class='rubyid_fatal identifier id'>fatal</span><span class='lparen token'>(</span><span class='rubyid_e identifier id'>e</span><span class='dot token'>.</span><span class='rubyid_message identifier id'>message</span><span class='rparen token'>)</span> <span class='colon op'>:</span> <span class='rubyid_Bovem constant id'>Bovem</span><span class='colon2 op'>::</span><span class='rubyid_Logger constant id'>Logger</span><span class='dot token'>.</span><span class='rubyid_create identifier id'>create</span><span class='lparen token'>(</span><span class='string val'>&quot;STDERR&quot;</span><span class='rparen token'>)</span><span class='dot token'>.</span><span class='rubyid_fatal identifier id'>fatal</span><span class='lparen token'>(</span><span class='dstring node'>&quot;Cannot log to {mark=bright}#{config.log_file}{/mark}. Exiting...&quot;</span><span class='rparen token'>)</span>
687
+ <span class='rubyid_raise identifier id'>raise</span> <span class='colon3 op'>::</span><span class='rubyid_SystemExit constant id'>SystemExit</span>
688
+ <span class='rubyid_end end kw'>end</span>
689
+
690
+ <span class='rubyid_self self kw'>self</span>
691
+ <span class='rubyid_end end kw'>end</span>
692
+ </pre>
692
693
  </td>
693
694
  </tr>
694
695
  </table>
@@ -733,9 +734,10 @@
733
734
  <td>
734
735
  <pre class="code"><span class="info file"># File 'lib/akaer/application.rb', line 15</span>
735
736
 
736
- <span class='kw'>def</span> <span class='id identifier rubyid_command'>command</span>
737
- <span class='ivar'>@command</span>
738
- <span class='kw'>end</span></pre>
737
+ <span class='rubyid_def def kw'>def</span> <span class='rubyid_command identifier id'>command</span>
738
+ <span class='rubyid_@command ivar id'>@command</span>
739
+ <span class='rubyid_end end kw'>end</span>
740
+ </pre>
739
741
  </td>
740
742
  </tr>
741
743
  </table>
@@ -775,9 +777,10 @@
775
777
  <td>
776
778
  <pre class="code"><span class="info file"># File 'lib/akaer/application.rb', line 12</span>
777
779
 
778
- <span class='kw'>def</span> <span class='id identifier rubyid_config'>config</span>
779
- <span class='ivar'>@config</span>
780
- <span class='kw'>end</span></pre>
780
+ <span class='rubyid_def def kw'>def</span> <span class='rubyid_config identifier id'>config</span>
781
+ <span class='rubyid_@config ivar id'>@config</span>
782
+ <span class='rubyid_end end kw'>end</span>
783
+ </pre>
781
784
  </td>
782
785
  </tr>
783
786
  </table>
@@ -817,9 +820,10 @@
817
820
  <td>
818
821
  <pre class="code"><span class="info file"># File 'lib/akaer/application.rb', line 18</span>
819
822
 
820
- <span class='kw'>def</span> <span class='id identifier rubyid_logger'>logger</span>
821
- <span class='ivar'>@logger</span>
822
- <span class='kw'>end</span></pre>
823
+ <span class='rubyid_def def kw'>def</span> <span class='rubyid_logger identifier id'>logger</span>
824
+ <span class='rubyid_@logger ivar id'>@logger</span>
825
+ <span class='rubyid_end end kw'>end</span>
826
+ </pre>
823
827
  </td>
824
828
  </tr>
825
829
  </table>
@@ -918,10 +922,11 @@
918
922
  <td>
919
923
  <pre class="code"><span class="info file"># File 'lib/akaer/application.rb', line 304</span>
920
924
 
921
- <span class='kw'>def</span> <span class='kw'>self</span><span class='period'>.</span><span class='id identifier rubyid_instance'>instance</span><span class='lparen'>(</span><span class='id identifier rubyid_command'>command</span><span class='comma'>,</span> <span class='id identifier rubyid_force'>force</span> <span class='op'>=</span> <span class='kw'>false</span><span class='rparen'>)</span>
922
- <span class='ivar'>@instance</span> <span class='op'>=</span> <span class='kw'>nil</span> <span class='kw'>if</span> <span class='id identifier rubyid_force'>force</span>
923
- <span class='ivar'>@instance</span> <span class='op'>||=</span> <span class='const'>Akaer</span><span class='op'>::</span><span class='const'>Application</span><span class='period'>.</span><span class='id identifier rubyid_new'>new</span><span class='lparen'>(</span><span class='id identifier rubyid_command'>command</span><span class='rparen'>)</span>
924
- <span class='kw'>end</span></pre>
925
+ <span class='rubyid_def def kw'>def</span> <span class='rubyid_self self kw'>self</span><span class='dot token'>.</span><span class='rubyid_instance identifier id'>instance</span><span class='lparen token'>(</span><span class='rubyid_command identifier id'>command</span><span class='comma token'>,</span> <span class='rubyid_force identifier id'>force</span> <span class='assign token'>=</span> <span class='rubyid_false false kw'>false</span><span class='rparen token'>)</span>
926
+ <span class='rubyid_@instance ivar id'>@instance</span> <span class='assign token'>=</span> <span class='rubyid_nil nil kw'>nil</span> <span class='rubyid_if if_mod kw'>if</span> <span class='rubyid_force identifier id'>force</span>
927
+ <span class='rubyid_@instance ivar id'>@instance</span> <span class='opasgn op'>||=</span> <span class='rubyid_Akaer constant id'>Akaer</span><span class='colon2 op'>::</span><span class='rubyid_Application constant id'>Application</span><span class='dot token'>.</span><span class='rubyid_new identifier id'>new</span><span class='lparen token'>(</span><span class='rubyid_command identifier id'>command</span><span class='rparen token'>)</span>
928
+ <span class='rubyid_end end kw'>end</span>
929
+ </pre>
925
930
  </td>
926
931
  </tr>
927
932
  </table>
@@ -991,18 +996,19 @@
991
996
  <td>
992
997
  <pre class="code"><span class="info file"># File 'lib/akaer/application.rb', line 198</span>
993
998
 
994
- <span class='kw'>def</span> <span class='id identifier rubyid_action_add'>action_add</span>
995
- <span class='id identifier rubyid_addresses'>addresses</span> <span class='op'>=</span> <span class='kw'>self</span><span class='period'>.</span><span class='id identifier rubyid_compute_addresses'>compute_addresses</span>
996
-
997
- <span class='kw'>if</span> <span class='id identifier rubyid_addresses'>addresses</span><span class='period'>.</span><span class='id identifier rubyid_present?'>present?</span> <span class='kw'>then</span>
998
- <span class='comment'># Now, for every address, call the command
999
- </span> <span class='id identifier rubyid_addresses'>addresses</span><span class='period'>.</span><span class='id identifier rubyid_all?'>all?</span> <span class='lbrace'>{</span><span class='op'>|</span><span class='id identifier rubyid_address'>address</span><span class='op'>|</span>
1000
- <span class='kw'>self</span><span class='period'>.</span><span class='id identifier rubyid_manage'>manage</span><span class='lparen'>(</span><span class='symbol'>:add</span><span class='comma'>,</span> <span class='id identifier rubyid_address'>address</span><span class='rparen'>)</span>
1001
- <span class='rbrace'>}</span>
1002
- <span class='kw'>else</span>
1003
- <span class='ivar'>@logger</span><span class='period'>.</span><span class='id identifier rubyid_error'>error</span><span class='lparen'>(</span><span class='tstring'><span class='tstring_beg'>&quot;</span><span class='tstring_content'>No valid addresses to add to the interface found.</span><span class='tstring_end'>&quot;</span></span><span class='rparen'>)</span> <span class='kw'>if</span> <span class='op'>!</span><span class='kw'>self</span><span class='period'>.</span><span class='id identifier rubyid_config'>config</span><span class='period'>.</span><span class='id identifier rubyid_quiet'>quiet</span>
1004
- <span class='kw'>end</span>
1005
- <span class='kw'>end</span></pre>
999
+ <span class='rubyid_def def kw'>def</span> <span class='rubyid_action_add identifier id'>action_add</span>
1000
+ <span class='rubyid_addresses identifier id'>addresses</span> <span class='assign token'>=</span> <span class='rubyid_self self kw'>self</span><span class='dot token'>.</span><span class='rubyid_compute_addresses identifier id'>compute_addresses</span>
1001
+
1002
+ <span class='rubyid_if if kw'>if</span> <span class='rubyid_addresses identifier id'>addresses</span><span class='dot token'>.</span><span class='rubyid_present? fid id'>present?</span> <span class='rubyid_then then kw'>then</span>
1003
+ <span class='comment val'># Now, for every address, call the command</span>
1004
+ <span class='rubyid_addresses identifier id'>addresses</span><span class='dot token'>.</span><span class='rubyid_all? fid id'>all?</span> <span class='lbrace token'>{</span><span class='bitor op'>|</span><span class='rubyid_address identifier id'>address</span><span class='bitor op'>|</span>
1005
+ <span class='rubyid_self self kw'>self</span><span class='dot token'>.</span><span class='rubyid_manage identifier id'>manage</span><span class='lparen token'>(</span><span class='symbol val'>:add</span><span class='comma token'>,</span> <span class='rubyid_address identifier id'>address</span><span class='rparen token'>)</span>
1006
+ <span class='rbrace token'>}</span>
1007
+ <span class='rubyid_else else kw'>else</span>
1008
+ <span class='rubyid_@logger ivar id'>@logger</span><span class='dot token'>.</span><span class='rubyid_error identifier id'>error</span><span class='lparen token'>(</span><span class='string val'>&quot;No valid addresses to add to the interface found.&quot;</span><span class='rparen token'>)</span> <span class='rubyid_if if_mod kw'>if</span> <span class='notop op'>!</span><span class='rubyid_self self kw'>self</span><span class='dot token'>.</span><span class='rubyid_config identifier id'>config</span><span class='dot token'>.</span><span class='rubyid_quiet identifier id'>quiet</span>
1009
+ <span class='rubyid_end end kw'>end</span>
1010
+ <span class='rubyid_end end kw'>end</span>
1011
+ </pre>
1006
1012
  </td>
1007
1013
  </tr>
1008
1014
  </table>
@@ -1090,42 +1096,43 @@
1090
1096
  <td>
1091
1097
  <pre class="code"><span class="info file"># File 'lib/akaer/application.rb', line 230</span>
1092
1098
 
1093
- <span class='kw'>def</span> <span class='id identifier rubyid_action_install'>action_install</span>
1094
- <span class='id identifier rubyid_logger'>logger</span> <span class='op'>=</span> <span class='id identifier rubyid_get_logger'>get_logger</span>
1095
-
1096
- <span class='kw'>if</span> <span class='op'>!</span><span class='kw'>self</span><span class='period'>.</span><span class='id identifier rubyid_is_osx?'>is_osx?</span> <span class='kw'>then</span>
1097
- <span class='id identifier rubyid_logger'>logger</span><span class='period'>.</span><span class='id identifier rubyid_fatal'>fatal</span><span class='lparen'>(</span><span class='tstring'><span class='tstring_beg'>&quot;</span><span class='tstring_content'>Install akaer on autolaunch is only available on MacOSX.</span><span class='tstring_end'>&quot;</span></span><span class='rparen'>)</span> <span class='kw'>if</span> <span class='op'>!</span><span class='kw'>self</span><span class='period'>.</span><span class='id identifier rubyid_config'>config</span><span class='period'>.</span><span class='id identifier rubyid_quiet'>quiet</span>
1098
- <span class='kw'>return</span> <span class='kw'>false</span>
1099
- <span class='kw'>end</span>
1100
-
1101
- <span class='id identifier rubyid_launch_agent'>launch_agent</span> <span class='op'>=</span> <span class='kw'>self</span><span class='period'>.</span><span class='id identifier rubyid_launch_agent_path'>launch_agent_path</span>
1102
-
1103
- <span class='kw'>begin</span>
1104
- <span class='id identifier rubyid_logger'>logger</span><span class='period'>.</span><span class='id identifier rubyid_info'>info</span><span class='lparen'>(</span><span class='tstring'><span class='tstring_beg'>&quot;</span><span class='tstring_content'>Creating the launch agent in {mark=bright}</span><span class='embexpr_beg'>#{</span><span class='id identifier rubyid_launch_agent'>launch_agent</span><span class='rbrace'>}</span><span class='tstring_content'>{/mark} ...</span><span class='tstring_end'>&quot;</span></span><span class='rparen'>)</span> <span class='kw'>if</span> <span class='op'>!</span><span class='kw'>self</span><span class='period'>.</span><span class='id identifier rubyid_config'>config</span><span class='period'>.</span><span class='id identifier rubyid_quiet'>quiet</span>
1105
-
1106
- <span class='id identifier rubyid_args'>args</span> <span class='op'>=</span> <span class='gvar'>$ARGV</span> <span class='op'>?</span> <span class='gvar'>$ARGV</span><span class='lbracket'>[</span><span class='int'>0</span><span class='comma'>,</span> <span class='gvar'>$ARGV</span><span class='period'>.</span><span class='id identifier rubyid_length'>length</span> <span class='op'>-</span> <span class='int'>1</span><span class='rbracket'>]</span> <span class='op'>:</span> <span class='lbracket'>[</span><span class='rbracket'>]</span>
1107
-
1108
- <span class='id identifier rubyid_plist'>plist</span> <span class='op'>=</span> <span class='lbrace'>{</span><span class='tstring'><span class='tstring_beg'>&quot;</span><span class='tstring_content'>KeepAlive</span><span class='tstring_end'>&quot;</span></span> <span class='op'>=&gt;</span> <span class='kw'>false</span><span class='comma'>,</span> <span class='tstring'><span class='tstring_beg'>&quot;</span><span class='tstring_content'>Label</span><span class='tstring_end'>&quot;</span></span> <span class='op'>=&gt;</span> <span class='tstring'><span class='tstring_beg'>&quot;</span><span class='tstring_content'>it.cowtech.akaer</span><span class='tstring_end'>&quot;</span></span><span class='comma'>,</span> <span class='tstring'><span class='tstring_beg'>&quot;</span><span class='tstring_content'>Program</span><span class='tstring_end'>&quot;</span></span> <span class='op'>=&gt;</span> <span class='lparen'>(</span><span class='op'>::</span><span class='const'>Pathname</span><span class='period'>.</span><span class='id identifier rubyid_new'>new</span><span class='lparen'>(</span><span class='const'>Dir</span><span class='period'>.</span><span class='id identifier rubyid_pwd'>pwd</span><span class='rparen'>)</span> <span class='op'>+</span> <span class='gvar'>$0</span><span class='rparen'>)</span><span class='period'>.</span><span class='id identifier rubyid_to_s'>to_s</span><span class='comma'>,</span> <span class='tstring'><span class='tstring_beg'>&quot;</span><span class='tstring_content'>ProgramArguments</span><span class='tstring_end'>&quot;</span></span> <span class='op'>=&gt;</span> <span class='id identifier rubyid_args'>args</span><span class='comma'>,</span> <span class='tstring'><span class='tstring_beg'>&quot;</span><span class='tstring_content'>RunAtLoad</span><span class='tstring_end'>&quot;</span></span> <span class='op'>=&gt;</span> <span class='kw'>true</span><span class='rbrace'>}</span>
1109
- <span class='op'>::</span><span class='const'>File</span><span class='period'>.</span><span class='id identifier rubyid_open'>open</span><span class='lparen'>(</span><span class='id identifier rubyid_launch_agent'>launch_agent</span><span class='comma'>,</span> <span class='tstring'><span class='tstring_beg'>&quot;</span><span class='tstring_content'>w</span><span class='tstring_end'>&quot;</span></span><span class='rparen'>)</span> <span class='lbrace'>{</span><span class='op'>|</span><span class='id identifier rubyid_f'>f</span><span class='op'>|</span>
1110
- <span class='id identifier rubyid_f'>f</span><span class='period'>.</span><span class='id identifier rubyid_write'>write</span><span class='lparen'>(</span><span class='id identifier rubyid_plist'>plist</span><span class='period'>.</span><span class='id identifier rubyid_to_json'>to_json</span><span class='rparen'>)</span>
1111
- <span class='id identifier rubyid_f'>f</span><span class='period'>.</span><span class='id identifier rubyid_flush'>flush</span>
1112
- <span class='rbrace'>}</span>
1113
- <span class='kw'>self</span><span class='period'>.</span><span class='id identifier rubyid_execute_command'>execute_command</span><span class='lparen'>(</span><span class='tstring'><span class='tstring_beg'>&quot;</span><span class='tstring_content'>plutil -convert binary1 \&quot;</span><span class='embexpr_beg'>#{</span><span class='id identifier rubyid_launch_agent'>launch_agent</span><span class='rbrace'>}</span><span class='tstring_content'>\&quot;</span><span class='tstring_end'>&quot;</span></span><span class='rparen'>)</span>
1114
- <span class='kw'>rescue</span> <span class='op'>=&gt;</span> <span class='id identifier rubyid_e'>e</span>
1115
- <span class='id identifier rubyid_logger'>logger</span><span class='period'>.</span><span class='id identifier rubyid_error'>error</span><span class='lparen'>(</span><span class='tstring'><span class='tstring_beg'>&quot;</span><span class='tstring_content'>Cannot create the launch agent.</span><span class='tstring_end'>&quot;</span></span><span class='rparen'>)</span> <span class='kw'>if</span> <span class='op'>!</span><span class='kw'>self</span><span class='period'>.</span><span class='id identifier rubyid_config'>config</span><span class='period'>.</span><span class='id identifier rubyid_quiet'>quiet</span>
1116
- <span class='kw'>return</span> <span class='kw'>false</span>
1117
- <span class='kw'>end</span>
1118
-
1119
- <span class='kw'>begin</span>
1120
- <span class='id identifier rubyid_logger'>logger</span><span class='period'>.</span><span class='id identifier rubyid_info'>info</span><span class='lparen'>(</span><span class='tstring'><span class='tstring_beg'>&quot;</span><span class='tstring_content'>Loading the launch agent ...</span><span class='tstring_end'>&quot;</span></span><span class='rparen'>)</span> <span class='kw'>if</span> <span class='op'>!</span><span class='kw'>self</span><span class='period'>.</span><span class='id identifier rubyid_config'>config</span><span class='period'>.</span><span class='id identifier rubyid_quiet'>quiet</span>
1121
- <span class='kw'>self</span><span class='period'>.</span><span class='id identifier rubyid_execute_command'>execute_command</span><span class='lparen'>(</span><span class='tstring'><span class='tstring_beg'>&quot;</span><span class='tstring_content'>launchctl load -w \&quot;</span><span class='embexpr_beg'>#{</span><span class='id identifier rubyid_launch_agent'>launch_agent</span><span class='rbrace'>}</span><span class='tstring_content'>\&quot; &gt; /dev/null 2&gt;&amp;1</span><span class='tstring_end'>&quot;</span></span><span class='rparen'>)</span>
1122
- <span class='kw'>rescue</span> <span class='op'>=&gt;</span> <span class='id identifier rubyid_e'>e</span>
1123
- <span class='id identifier rubyid_logger'>logger</span><span class='period'>.</span><span class='id identifier rubyid_error'>error</span><span class='lparen'>(</span><span class='tstring'><span class='tstring_beg'>&quot;</span><span class='tstring_content'>Cannot load the launch agent.</span><span class='tstring_end'>&quot;</span></span><span class='rparen'>)</span> <span class='kw'>if</span> <span class='op'>!</span><span class='kw'>self</span><span class='period'>.</span><span class='id identifier rubyid_config'>config</span><span class='period'>.</span><span class='id identifier rubyid_quiet'>quiet</span>
1124
- <span class='kw'>return</span> <span class='kw'>false</span>
1125
- <span class='kw'>end</span>
1126
-
1127
- <span class='kw'>true</span>
1128
- <span class='kw'>end</span></pre>
1099
+ <span class='rubyid_def def kw'>def</span> <span class='rubyid_action_install identifier id'>action_install</span>
1100
+ <span class='rubyid_logger identifier id'>logger</span> <span class='assign token'>=</span> <span class='rubyid_get_logger identifier id'>get_logger</span>
1101
+
1102
+ <span class='rubyid_if if kw'>if</span> <span class='notop op'>!</span><span class='rubyid_self self kw'>self</span><span class='dot token'>.</span><span class='rubyid_is_osx? fid id'>is_osx?</span> <span class='rubyid_then then kw'>then</span>
1103
+ <span class='rubyid_logger identifier id'>logger</span><span class='dot token'>.</span><span class='rubyid_fatal identifier id'>fatal</span><span class='lparen token'>(</span><span class='string val'>&quot;Install akaer on autolaunch is only available on MacOSX.&quot;</span><span class='rparen token'>)</span> <span class='rubyid_if if_mod kw'>if</span> <span class='notop op'>!</span><span class='rubyid_self self kw'>self</span><span class='dot token'>.</span><span class='rubyid_config identifier id'>config</span><span class='dot token'>.</span><span class='rubyid_quiet identifier id'>quiet</span>
1104
+ <span class='rubyid_return return kw'>return</span> <span class='rubyid_false false kw'>false</span>
1105
+ <span class='rubyid_end end kw'>end</span>
1106
+
1107
+ <span class='rubyid_launch_agent identifier id'>launch_agent</span> <span class='assign token'>=</span> <span class='rubyid_self self kw'>self</span><span class='dot token'>.</span><span class='rubyid_launch_agent_path identifier id'>launch_agent_path</span>
1108
+
1109
+ <span class='rubyid_begin begin kw'>begin</span>
1110
+ <span class='rubyid_logger identifier id'>logger</span><span class='dot token'>.</span><span class='rubyid_info identifier id'>info</span><span class='lparen token'>(</span><span class='dstring node'>&quot;Creating the launch agent in {mark=bright}#{launch_agent}{/mark} ...&quot;</span><span class='rparen token'>)</span> <span class='rubyid_if if_mod kw'>if</span> <span class='notop op'>!</span><span class='rubyid_self self kw'>self</span><span class='dot token'>.</span><span class='rubyid_config identifier id'>config</span><span class='dot token'>.</span><span class='rubyid_quiet identifier id'>quiet</span>
1111
+
1112
+ <span class='rubyid_args identifier id'>args</span> <span class='assign token'>=</span> <span class='rubyid_$ARGV gvar id'>$ARGV</span> <span class='question op'>?</span> <span class='rubyid_$ARGV gvar id'>$ARGV</span><span class='lbrack token'>[</span><span class='integer val'>0</span><span class='comma token'>,</span> <span class='rubyid_$ARGV gvar id'>$ARGV</span><span class='dot token'>.</span><span class='rubyid_length identifier id'>length</span> <span class='minus op'>-</span> <span class='integer val'>1</span><span class='rbrack token'>]</span> <span class='colon op'>:</span> <span class='lbrack token'>[</span><span class='rbrack token'>]</span>
1113
+
1114
+ <span class='rubyid_plist identifier id'>plist</span> <span class='assign token'>=</span> <span class='lbrace token'>{</span><span class='string val'>&quot;KeepAlive&quot;</span> <span class='assign token'>=</span><span class='gt op'>&gt;</span> <span class='rubyid_false false kw'>false</span><span class='comma token'>,</span> <span class='string val'>&quot;Label&quot;</span> <span class='assign token'>=</span><span class='gt op'>&gt;</span> <span class='string val'>&quot;it.cowtech.akaer&quot;</span><span class='comma token'>,</span> <span class='string val'>&quot;Program&quot;</span> <span class='assign token'>=</span><span class='gt op'>&gt;</span> <span class='lparen token'>(</span><span class='colon3 op'>::</span><span class='rubyid_Pathname constant id'>Pathname</span><span class='dot token'>.</span><span class='rubyid_new identifier id'>new</span><span class='lparen token'>(</span><span class='rubyid_Dir constant id'>Dir</span><span class='dot token'>.</span><span class='rubyid_pwd identifier id'>pwd</span><span class='rparen token'>)</span> <span class='plus op'>+</span> <span class='rubyid_$0 gvar id'>$0</span><span class='rparen token'>)</span><span class='dot token'>.</span><span class='rubyid_to_s identifier id'>to_s</span><span class='comma token'>,</span> <span class='string val'>&quot;ProgramArguments&quot;</span> <span class='assign token'>=</span><span class='gt op'>&gt;</span> <span class='rubyid_args identifier id'>args</span><span class='comma token'>,</span> <span class='string val'>&quot;RunAtLoad&quot;</span> <span class='assign token'>=</span><span class='gt op'>&gt;</span> <span class='rubyid_true true kw'>true</span><span class='rbrace token'>}</span>
1115
+ <span class='colon3 op'>::</span><span class='rubyid_File constant id'>File</span><span class='dot token'>.</span><span class='rubyid_open identifier id'>open</span><span class='lparen token'>(</span><span class='rubyid_launch_agent identifier id'>launch_agent</span><span class='comma token'>,</span> <span class='string val'>&quot;w&quot;</span><span class='rparen token'>)</span> <span class='lbrace token'>{</span><span class='bitor op'>|</span><span class='rubyid_f identifier id'>f</span><span class='bitor op'>|</span>
1116
+ <span class='rubyid_f identifier id'>f</span><span class='dot token'>.</span><span class='rubyid_write identifier id'>write</span><span class='lparen token'>(</span><span class='rubyid_plist identifier id'>plist</span><span class='dot token'>.</span><span class='rubyid_to_json identifier id'>to_json</span><span class='rparen token'>)</span>
1117
+ <span class='rubyid_f identifier id'>f</span><span class='dot token'>.</span><span class='rubyid_flush identifier id'>flush</span>
1118
+ <span class='rbrace token'>}</span>
1119
+ <span class='rubyid_self self kw'>self</span><span class='dot token'>.</span><span class='rubyid_execute_command identifier id'>execute_command</span><span class='lparen token'>(</span><span class='dstring node'>&quot;plutil -convert binary1 \&quot;#{launch_agent}\&quot;&quot;</span><span class='rparen token'>)</span>
1120
+ <span class='rubyid_rescue rescue kw'>rescue</span> <span class='assign token'>=</span><span class='gt op'>&gt;</span> <span class='rubyid_e identifier id'>e</span>
1121
+ <span class='rubyid_logger identifier id'>logger</span><span class='dot token'>.</span><span class='rubyid_error identifier id'>error</span><span class='lparen token'>(</span><span class='string val'>&quot;Cannot create the launch agent.&quot;</span><span class='rparen token'>)</span> <span class='rubyid_if if_mod kw'>if</span> <span class='notop op'>!</span><span class='rubyid_self self kw'>self</span><span class='dot token'>.</span><span class='rubyid_config identifier id'>config</span><span class='dot token'>.</span><span class='rubyid_quiet identifier id'>quiet</span>
1122
+ <span class='rubyid_return return kw'>return</span> <span class='rubyid_false false kw'>false</span>
1123
+ <span class='rubyid_end end kw'>end</span>
1124
+
1125
+ <span class='rubyid_begin begin kw'>begin</span>
1126
+ <span class='rubyid_logger identifier id'>logger</span><span class='dot token'>.</span><span class='rubyid_info identifier id'>info</span><span class='lparen token'>(</span><span class='string val'>&quot;Loading the launch agent ...&quot;</span><span class='rparen token'>)</span> <span class='rubyid_if if_mod kw'>if</span> <span class='notop op'>!</span><span class='rubyid_self self kw'>self</span><span class='dot token'>.</span><span class='rubyid_config identifier id'>config</span><span class='dot token'>.</span><span class='rubyid_quiet identifier id'>quiet</span>
1127
+ <span class='rubyid_self self kw'>self</span><span class='dot token'>.</span><span class='rubyid_execute_command identifier id'>execute_command</span><span class='lparen token'>(</span><span class='dstring node'>&quot;launchctl load -w \&quot;#{launch_agent}\&quot; &gt; /dev/null 2&gt;&amp;1&quot;</span><span class='rparen token'>)</span>
1128
+ <span class='rubyid_rescue rescue kw'>rescue</span> <span class='assign token'>=</span><span class='gt op'>&gt;</span> <span class='rubyid_e identifier id'>e</span>
1129
+ <span class='rubyid_logger identifier id'>logger</span><span class='dot token'>.</span><span class='rubyid_error identifier id'>error</span><span class='lparen token'>(</span><span class='string val'>&quot;Cannot load the launch agent.&quot;</span><span class='rparen token'>)</span> <span class='rubyid_if if_mod kw'>if</span> <span class='notop op'>!</span><span class='rubyid_self self kw'>self</span><span class='dot token'>.</span><span class='rubyid_config identifier id'>config</span><span class='dot token'>.</span><span class='rubyid_quiet identifier id'>quiet</span>
1130
+ <span class='rubyid_return return kw'>return</span> <span class='rubyid_false false kw'>false</span>
1131
+ <span class='rubyid_end end kw'>end</span>
1132
+
1133
+ <span class='rubyid_true true kw'>true</span>
1134
+ <span class='rubyid_end end kw'>end</span>
1135
+ </pre>
1129
1136
  </td>
1130
1137
  </tr>
1131
1138
  </table>
@@ -1189,18 +1196,19 @@
1189
1196
  <td>
1190
1197
  <pre class="code"><span class="info file"># File 'lib/akaer/application.rb', line 214</span>
1191
1198
 
1192
- <span class='kw'>def</span> <span class='id identifier rubyid_action_remove'>action_remove</span>
1193
- <span class='id identifier rubyid_addresses'>addresses</span> <span class='op'>=</span> <span class='kw'>self</span><span class='period'>.</span><span class='id identifier rubyid_compute_addresses'>compute_addresses</span>
1194
-
1195
- <span class='kw'>if</span> <span class='id identifier rubyid_addresses'>addresses</span><span class='period'>.</span><span class='id identifier rubyid_present?'>present?</span> <span class='kw'>then</span>
1196
- <span class='comment'># Now, for every address, call the command
1197
- </span> <span class='id identifier rubyid_addresses'>addresses</span><span class='period'>.</span><span class='id identifier rubyid_all?'>all?</span> <span class='lbrace'>{</span><span class='op'>|</span><span class='id identifier rubyid_address'>address</span><span class='op'>|</span>
1198
- <span class='kw'>self</span><span class='period'>.</span><span class='id identifier rubyid_manage'>manage</span><span class='lparen'>(</span><span class='symbol'>:remove</span><span class='comma'>,</span> <span class='id identifier rubyid_address'>address</span><span class='rparen'>)</span>
1199
- <span class='rbrace'>}</span>
1200
- <span class='kw'>else</span>
1201
- <span class='ivar'>@logger</span><span class='period'>.</span><span class='id identifier rubyid_error'>error</span><span class='lparen'>(</span><span class='tstring'><span class='tstring_beg'>&quot;</span><span class='tstring_content'>No valid addresses to remove from the interface found.</span><span class='tstring_end'>&quot;</span></span><span class='rparen'>)</span> <span class='kw'>if</span> <span class='op'>!</span><span class='kw'>self</span><span class='period'>.</span><span class='id identifier rubyid_config'>config</span><span class='period'>.</span><span class='id identifier rubyid_quiet'>quiet</span>
1202
- <span class='kw'>end</span>
1203
- <span class='kw'>end</span></pre>
1199
+ <span class='rubyid_def def kw'>def</span> <span class='rubyid_action_remove identifier id'>action_remove</span>
1200
+ <span class='rubyid_addresses identifier id'>addresses</span> <span class='assign token'>=</span> <span class='rubyid_self self kw'>self</span><span class='dot token'>.</span><span class='rubyid_compute_addresses identifier id'>compute_addresses</span>
1201
+
1202
+ <span class='rubyid_if if kw'>if</span> <span class='rubyid_addresses identifier id'>addresses</span><span class='dot token'>.</span><span class='rubyid_present? fid id'>present?</span> <span class='rubyid_then then kw'>then</span>
1203
+ <span class='comment val'># Now, for every address, call the command</span>
1204
+ <span class='rubyid_addresses identifier id'>addresses</span><span class='dot token'>.</span><span class='rubyid_all? fid id'>all?</span> <span class='lbrace token'>{</span><span class='bitor op'>|</span><span class='rubyid_address identifier id'>address</span><span class='bitor op'>|</span>
1205
+ <span class='rubyid_self self kw'>self</span><span class='dot token'>.</span><span class='rubyid_manage identifier id'>manage</span><span class='lparen token'>(</span><span class='symbol val'>:remove</span><span class='comma token'>,</span> <span class='rubyid_address identifier id'>address</span><span class='rparen token'>)</span>
1206
+ <span class='rbrace token'>}</span>
1207
+ <span class='rubyid_else else kw'>else</span>
1208
+ <span class='rubyid_@logger ivar id'>@logger</span><span class='dot token'>.</span><span class='rubyid_error identifier id'>error</span><span class='lparen token'>(</span><span class='string val'>&quot;No valid addresses to remove from the interface found.&quot;</span><span class='rparen token'>)</span> <span class='rubyid_if if_mod kw'>if</span> <span class='notop op'>!</span><span class='rubyid_self self kw'>self</span><span class='dot token'>.</span><span class='rubyid_config identifier id'>config</span><span class='dot token'>.</span><span class='rubyid_quiet identifier id'>quiet</span>
1209
+ <span class='rubyid_end end kw'>end</span>
1210
+ <span class='rubyid_end end kw'>end</span>
1211
+ </pre>
1204
1212
  </td>
1205
1213
  </tr>
1206
1214
  </table>
@@ -1280,34 +1288,35 @@
1280
1288
  <td>
1281
1289
  <pre class="code"><span class="info file"># File 'lib/akaer/application.rb', line 270</span>
1282
1290
 
1283
- <span class='kw'>def</span> <span class='id identifier rubyid_action_uninstall'>action_uninstall</span>
1284
- <span class='id identifier rubyid_logger'>logger</span> <span class='op'>=</span> <span class='kw'>self</span><span class='period'>.</span><span class='id identifier rubyid_get_logger'>get_logger</span>
1285
-
1286
- <span class='kw'>if</span> <span class='op'>!</span><span class='kw'>self</span><span class='period'>.</span><span class='id identifier rubyid_is_osx?'>is_osx?</span> <span class='kw'>then</span>
1287
- <span class='id identifier rubyid_logger'>logger</span><span class='period'>.</span><span class='id identifier rubyid_fatal'>fatal</span><span class='lparen'>(</span><span class='tstring'><span class='tstring_beg'>&quot;</span><span class='tstring_content'>Install akaer on autolaunch is only available on MacOSX.</span><span class='tstring_end'>&quot;</span></span><span class='rparen'>)</span> <span class='kw'>if</span> <span class='op'>!</span><span class='kw'>self</span><span class='period'>.</span><span class='id identifier rubyid_config'>config</span><span class='period'>.</span><span class='id identifier rubyid_quiet'>quiet</span>
1288
- <span class='kw'>return</span> <span class='kw'>false</span>
1289
- <span class='kw'>end</span>
1290
-
1291
- <span class='id identifier rubyid_launch_agent'>launch_agent</span> <span class='op'>=</span> <span class='kw'>self</span><span class='period'>.</span><span class='id identifier rubyid_launch_agent_path'>launch_agent_path</span>
1292
-
1293
- <span class='comment'># Unload the launch agent.
1294
- </span> <span class='kw'>begin</span>
1295
- <span class='kw'>self</span><span class='period'>.</span><span class='id identifier rubyid_execute_command'>execute_command</span><span class='lparen'>(</span><span class='tstring'><span class='tstring_beg'>&quot;</span><span class='tstring_content'>launchctl unload -w \&quot;</span><span class='embexpr_beg'>#{</span><span class='id identifier rubyid_launch_agent'>launch_agent</span><span class='rbrace'>}</span><span class='tstring_content'>\&quot; &gt; /dev/null 2&gt;&amp;1</span><span class='tstring_end'>&quot;</span></span><span class='rparen'>)</span>
1296
- <span class='kw'>rescue</span> <span class='op'>=&gt;</span> <span class='id identifier rubyid_e'>e</span>
1297
- <span class='id identifier rubyid_logger'>logger</span><span class='period'>.</span><span class='id identifier rubyid_warn'>warn</span><span class='lparen'>(</span><span class='tstring'><span class='tstring_beg'>&quot;</span><span class='tstring_content'>Cannot unload the launch agent.</span><span class='tstring_end'>&quot;</span></span><span class='rparen'>)</span> <span class='kw'>if</span> <span class='op'>!</span><span class='kw'>self</span><span class='period'>.</span><span class='id identifier rubyid_config'>config</span><span class='period'>.</span><span class='id identifier rubyid_quiet'>quiet</span>
1298
- <span class='kw'>end</span>
1299
-
1300
- <span class='comment'># Delete the launch agent.
1301
- </span> <span class='kw'>begin</span>
1302
- <span class='id identifier rubyid_logger'>logger</span><span class='period'>.</span><span class='id identifier rubyid_info'>info</span><span class='lparen'>(</span><span class='tstring'><span class='tstring_beg'>&quot;</span><span class='tstring_content'>Deleting the launch agent </span><span class='embexpr_beg'>#{</span><span class='id identifier rubyid_launch_agent'>launch_agent</span><span class='rbrace'>}</span><span class='tstring_content'> ...</span><span class='tstring_end'>&quot;</span></span><span class='rparen'>)</span>
1303
- <span class='op'>::</span><span class='const'>File</span><span class='period'>.</span><span class='id identifier rubyid_delete'>delete</span><span class='lparen'>(</span><span class='id identifier rubyid_launch_agent'>launch_agent</span><span class='rparen'>)</span>
1304
- <span class='kw'>rescue</span> <span class='op'>=&gt;</span> <span class='id identifier rubyid_e'>e</span>
1305
- <span class='id identifier rubyid_logger'>logger</span><span class='period'>.</span><span class='id identifier rubyid_warn'>warn</span><span class='lparen'>(</span><span class='tstring'><span class='tstring_beg'>&quot;</span><span class='tstring_content'>Cannot delete the launch agent.</span><span class='tstring_end'>&quot;</span></span><span class='rparen'>)</span> <span class='kw'>if</span> <span class='op'>!</span><span class='kw'>self</span><span class='period'>.</span><span class='id identifier rubyid_config'>config</span><span class='period'>.</span><span class='id identifier rubyid_quiet'>quiet</span>
1306
- <span class='kw'>return</span> <span class='kw'>false</span>
1307
- <span class='kw'>end</span>
1308
-
1309
- <span class='kw'>true</span>
1310
- <span class='kw'>end</span></pre>
1291
+ <span class='rubyid_def def kw'>def</span> <span class='rubyid_action_uninstall identifier id'>action_uninstall</span>
1292
+ <span class='rubyid_logger identifier id'>logger</span> <span class='assign token'>=</span> <span class='rubyid_self self kw'>self</span><span class='dot token'>.</span><span class='rubyid_get_logger identifier id'>get_logger</span>
1293
+
1294
+ <span class='rubyid_if if kw'>if</span> <span class='notop op'>!</span><span class='rubyid_self self kw'>self</span><span class='dot token'>.</span><span class='rubyid_is_osx? fid id'>is_osx?</span> <span class='rubyid_then then kw'>then</span>
1295
+ <span class='rubyid_logger identifier id'>logger</span><span class='dot token'>.</span><span class='rubyid_fatal identifier id'>fatal</span><span class='lparen token'>(</span><span class='string val'>&quot;Install akaer on autolaunch is only available on MacOSX.&quot;</span><span class='rparen token'>)</span> <span class='rubyid_if if_mod kw'>if</span> <span class='notop op'>!</span><span class='rubyid_self self kw'>self</span><span class='dot token'>.</span><span class='rubyid_config identifier id'>config</span><span class='dot token'>.</span><span class='rubyid_quiet identifier id'>quiet</span>
1296
+ <span class='rubyid_return return kw'>return</span> <span class='rubyid_false false kw'>false</span>
1297
+ <span class='rubyid_end end kw'>end</span>
1298
+
1299
+ <span class='rubyid_launch_agent identifier id'>launch_agent</span> <span class='assign token'>=</span> <span class='rubyid_self self kw'>self</span><span class='dot token'>.</span><span class='rubyid_launch_agent_path identifier id'>launch_agent_path</span>
1300
+
1301
+ <span class='comment val'># Unload the launch agent.</span>
1302
+ <span class='rubyid_begin begin kw'>begin</span>
1303
+ <span class='rubyid_self self kw'>self</span><span class='dot token'>.</span><span class='rubyid_execute_command identifier id'>execute_command</span><span class='lparen token'>(</span><span class='dstring node'>&quot;launchctl unload -w \&quot;#{launch_agent}\&quot; &gt; /dev/null 2&gt;&amp;1&quot;</span><span class='rparen token'>)</span>
1304
+ <span class='rubyid_rescue rescue kw'>rescue</span> <span class='assign token'>=</span><span class='gt op'>&gt;</span> <span class='rubyid_e identifier id'>e</span>
1305
+ <span class='rubyid_logger identifier id'>logger</span><span class='dot token'>.</span><span class='rubyid_warn identifier id'>warn</span><span class='lparen token'>(</span><span class='string val'>&quot;Cannot unload the launch agent.&quot;</span><span class='rparen token'>)</span> <span class='rubyid_if if_mod kw'>if</span> <span class='notop op'>!</span><span class='rubyid_self self kw'>self</span><span class='dot token'>.</span><span class='rubyid_config identifier id'>config</span><span class='dot token'>.</span><span class='rubyid_quiet identifier id'>quiet</span>
1306
+ <span class='rubyid_end end kw'>end</span>
1307
+
1308
+ <span class='comment val'># Delete the launch agent.</span>
1309
+ <span class='rubyid_begin begin kw'>begin</span>
1310
+ <span class='rubyid_logger identifier id'>logger</span><span class='dot token'>.</span><span class='rubyid_info identifier id'>info</span><span class='lparen token'>(</span><span class='dstring node'>&quot;Deleting the launch agent #{launch_agent} ...&quot;</span><span class='rparen token'>)</span>
1311
+ <span class='colon3 op'>::</span><span class='rubyid_File constant id'>File</span><span class='dot token'>.</span><span class='rubyid_delete identifier id'>delete</span><span class='lparen token'>(</span><span class='rubyid_launch_agent identifier id'>launch_agent</span><span class='rparen token'>)</span>
1312
+ <span class='rubyid_rescue rescue kw'>rescue</span> <span class='assign token'>=</span><span class='gt op'>&gt;</span> <span class='rubyid_e identifier id'>e</span>
1313
+ <span class='rubyid_logger identifier id'>logger</span><span class='dot token'>.</span><span class='rubyid_warn identifier id'>warn</span><span class='lparen token'>(</span><span class='string val'>&quot;Cannot delete the launch agent.&quot;</span><span class='rparen token'>)</span> <span class='rubyid_if if_mod kw'>if</span> <span class='notop op'>!</span><span class='rubyid_self self kw'>self</span><span class='dot token'>.</span><span class='rubyid_config identifier id'>config</span><span class='dot token'>.</span><span class='rubyid_quiet identifier id'>quiet</span>
1314
+ <span class='rubyid_return return kw'>return</span> <span class='rubyid_false false kw'>false</span>
1315
+ <span class='rubyid_end end kw'>end</span>
1316
+
1317
+ <span class='rubyid_true true kw'>true</span>
1318
+ <span class='rubyid_end end kw'>end</span>
1319
+ </pre>
1311
1320
  </td>
1312
1321
  </tr>
1313
1322
  </table>
@@ -1406,32 +1415,33 @@
1406
1415
  <td>
1407
1416
  <pre class="code"><span class="info file"># File 'lib/akaer/application.rb', line 136</span>
1408
1417
 
1409
- <span class='kw'>def</span> <span class='id identifier rubyid_compute_addresses'>compute_addresses</span><span class='lparen'>(</span><span class='id identifier rubyid_type'>type</span> <span class='op'>=</span> <span class='symbol'>:all</span><span class='rparen'>)</span>
1410
- <span class='id identifier rubyid_rv'>rv</span> <span class='op'>=</span> <span class='lbracket'>[</span><span class='rbracket'>]</span>
1411
-
1412
- <span class='kw'>if</span> <span class='kw'>self</span><span class='period'>.</span><span class='id identifier rubyid_config'>config</span><span class='period'>.</span><span class='id identifier rubyid_addresses'>addresses</span><span class='period'>.</span><span class='id identifier rubyid_present?'>present?</span> <span class='comment'># We have an explicit list
1413
- </span> <span class='id identifier rubyid_rv'>rv</span> <span class='op'>=</span> <span class='kw'>self</span><span class='period'>.</span><span class='id identifier rubyid_config'>config</span><span class='period'>.</span><span class='id identifier rubyid_addresses'>addresses</span>
1414
-
1415
- <span class='comment'># Now filter the addresses
1416
- </span> <span class='id identifier rubyid_filters'>filters</span> <span class='op'>=</span> <span class='lbracket'>[</span><span class='id identifier rubyid_type'>type</span> <span class='op'>!=</span> <span class='symbol'>:ipv6</span> <span class='op'>?</span> <span class='symbol'>:ipv4</span> <span class='op'>:</span> <span class='kw'>nil</span><span class='comma'>,</span> <span class='id identifier rubyid_type'>type</span> <span class='op'>!=</span> <span class='symbol'>:ipv4</span> <span class='op'>?</span> <span class='symbol'>:ipv6</span> <span class='op'>:</span> <span class='kw'>nil</span><span class='rbracket'>]</span><span class='period'>.</span><span class='id identifier rubyid_compact'>compact</span>
1417
- <span class='id identifier rubyid_rv'>rv</span> <span class='op'>=</span> <span class='id identifier rubyid_rv'>rv</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_address'>address</span><span class='op'>|</span>
1418
- <span class='id identifier rubyid_filters'>filters</span><span class='period'>.</span><span class='id identifier rubyid_any?'>any?</span> <span class='lbrace'>{</span><span class='op'>|</span><span class='id identifier rubyid_filter'>filter</span><span class='op'>|</span> <span class='kw'>self</span><span class='period'>.</span><span class='id identifier rubyid_send'>send</span><span class='lparen'>(</span><span class='tstring'><span class='tstring_beg'>&quot;</span><span class='tstring_content'>is_</span><span class='embexpr_beg'>#{</span><span class='id identifier rubyid_filter'>filter</span><span class='rbrace'>}</span><span class='tstring_content'>?</span><span class='tstring_end'>&quot;</span></span><span class='comma'>,</span> <span class='id identifier rubyid_address'>address</span><span class='rparen'>)</span> <span class='rbrace'>}</span>
1419
- <span class='rbrace'>}</span><span class='period'>.</span><span class='id identifier rubyid_compact'>compact</span><span class='period'>.</span><span class='id identifier rubyid_uniq'>uniq</span>
1420
- <span class='kw'>else</span>
1421
- <span class='kw'>begin</span>
1422
- <span class='id identifier rubyid_ip'>ip</span> <span class='op'>=</span> <span class='const'>IPAddr</span><span class='period'>.</span><span class='id identifier rubyid_new'>new</span><span class='lparen'>(</span><span class='kw'>self</span><span class='period'>.</span><span class='id identifier rubyid_config'>config</span><span class='period'>.</span><span class='id identifier rubyid_start_address'>start_address</span><span class='period'>.</span><span class='id identifier rubyid_ensure_string'>ensure_string</span><span class='rparen'>)</span>
1423
- <span class='id identifier rubyid_raise'>raise</span> <span class='const'>ArgumentError</span> <span class='kw'>if</span> <span class='lparen'>(</span><span class='id identifier rubyid_type'>type</span> <span class='op'>==</span> <span class='symbol'>:ipv4</span> <span class='op'>&amp;&amp;</span> <span class='op'>!</span><span class='id identifier rubyid_ip'>ip</span><span class='period'>.</span><span class='id identifier rubyid_ipv4?'>ipv4?</span><span class='rparen'>)</span> <span class='op'>||</span> <span class='lparen'>(</span><span class='id identifier rubyid_type'>type</span> <span class='op'>==</span> <span class='symbol'>:ipv6</span> <span class='op'>&amp;&amp;</span> <span class='op'>!</span><span class='id identifier rubyid_ip'>ip</span><span class='period'>.</span><span class='id identifier rubyid_ipv6?'>ipv6?</span><span class='rparen'>)</span>
1424
-
1425
- <span class='lparen'>(</span><span class='kw'>self</span><span class='period'>.</span><span class='id identifier rubyid_config'>config</span><span class='period'>.</span><span class='id identifier rubyid_aliases'>aliases</span> <span class='op'>&gt;</span> <span class='int'>0</span> <span class='op'>?</span> <span class='kw'>self</span><span class='period'>.</span><span class='id identifier rubyid_config'>config</span><span class='period'>.</span><span class='id identifier rubyid_aliases'>aliases</span> <span class='op'>:</span> <span class='int'>5</span><span class='rparen'>)</span><span class='period'>.</span><span class='id identifier rubyid_times'>times</span> <span class='kw'>do</span>
1426
- <span class='id identifier rubyid_rv'>rv</span> <span class='op'>&lt;&lt;</span> <span class='id identifier rubyid_ip'>ip</span><span class='period'>.</span><span class='id identifier rubyid_to_s'>to_s</span>
1427
- <span class='id identifier rubyid_ip'>ip</span> <span class='op'>=</span> <span class='id identifier rubyid_ip'>ip</span><span class='period'>.</span><span class='id identifier rubyid_succ'>succ</span>
1428
- <span class='kw'>end</span>
1429
- <span class='kw'>rescue</span> <span class='const'>ArgumentError</span>
1430
- <span class='kw'>end</span>
1431
- <span class='kw'>end</span>
1432
-
1433
- <span class='id identifier rubyid_rv'>rv</span>
1434
- <span class='kw'>end</span></pre>
1418
+ <span class='rubyid_def def kw'>def</span> <span class='rubyid_compute_addresses identifier id'>compute_addresses</span><span class='lparen token'>(</span><span class='rubyid_type identifier id'>type</span> <span class='assign token'>=</span> <span class='symbol val'>:all</span><span class='rparen token'>)</span>
1419
+ <span class='rubyid_rv identifier id'>rv</span> <span class='assign token'>=</span> <span class='lbrack token'>[</span><span class='rbrack token'>]</span>
1420
+
1421
+ <span class='rubyid_if if kw'>if</span> <span class='rubyid_self self kw'>self</span><span class='dot token'>.</span><span class='rubyid_config identifier id'>config</span><span class='dot token'>.</span><span class='rubyid_addresses identifier id'>addresses</span><span class='dot token'>.</span><span class='rubyid_present? fid id'>present?</span> <span class='comment val'># We have an explicit list</span>
1422
+ <span class='rubyid_rv identifier id'>rv</span> <span class='assign token'>=</span> <span class='rubyid_self self kw'>self</span><span class='dot token'>.</span><span class='rubyid_config identifier id'>config</span><span class='dot token'>.</span><span class='rubyid_addresses identifier id'>addresses</span>
1423
+
1424
+ <span class='comment val'># Now filter the addresses</span>
1425
+ <span class='rubyid_filters identifier id'>filters</span> <span class='assign token'>=</span> <span class='lbrack token'>[</span><span class='rubyid_type identifier id'>type</span> <span class='neq op'>!=</span> <span class='symbol val'>:ipv6</span> <span class='question op'>?</span> <span class='symbol val'>:ipv4</span> <span class='colon op'>:</span> <span class='rubyid_nil nil kw'>nil</span><span class='comma token'>,</span> <span class='rubyid_type identifier id'>type</span> <span class='neq op'>!=</span> <span class='symbol val'>:ipv4</span> <span class='question op'>?</span> <span class='symbol val'>:ipv6</span> <span class='colon op'>:</span> <span class='rubyid_nil nil kw'>nil</span><span class='rbrack token'>]</span><span class='dot token'>.</span><span class='rubyid_compact identifier id'>compact</span>
1426
+ <span class='rubyid_rv identifier id'>rv</span> <span class='assign token'>=</span> <span class='rubyid_rv identifier id'>rv</span><span class='dot token'>.</span><span class='rubyid_select identifier id'>select</span> <span class='lbrace token'>{</span><span class='bitor op'>|</span><span class='rubyid_address identifier id'>address</span><span class='bitor op'>|</span>
1427
+ <span class='rubyid_filters identifier id'>filters</span><span class='dot token'>.</span><span class='rubyid_any? fid id'>any?</span> <span class='lbrace token'>{</span><span class='bitor op'>|</span><span class='rubyid_filter identifier id'>filter</span><span class='bitor op'>|</span> <span class='rubyid_self self kw'>self</span><span class='dot token'>.</span><span class='rubyid_send identifier id'>send</span><span class='lparen token'>(</span><span class='dstring node'>&quot;is_#{filter}?&quot;</span><span class='comma token'>,</span> <span class='rubyid_address identifier id'>address</span><span class='rparen token'>)</span> <span class='rbrace token'>}</span>
1428
+ <span class='rbrace token'>}</span><span class='dot token'>.</span><span class='rubyid_compact identifier id'>compact</span><span class='dot token'>.</span><span class='rubyid_uniq identifier id'>uniq</span>
1429
+ <span class='rubyid_else else kw'>else</span>
1430
+ <span class='rubyid_begin begin kw'>begin</span>
1431
+ <span class='rubyid_ip identifier id'>ip</span> <span class='assign token'>=</span> <span class='rubyid_IPAddr constant id'>IPAddr</span><span class='dot token'>.</span><span class='rubyid_new identifier id'>new</span><span class='lparen token'>(</span><span class='rubyid_self self kw'>self</span><span class='dot token'>.</span><span class='rubyid_config identifier id'>config</span><span class='dot token'>.</span><span class='rubyid_start_address identifier id'>start_address</span><span class='dot token'>.</span><span class='rubyid_ensure_string identifier id'>ensure_string</span><span class='rparen token'>)</span>
1432
+ <span class='rubyid_raise identifier id'>raise</span> <span class='rubyid_ArgumentError constant id'>ArgumentError</span> <span class='rubyid_if if_mod kw'>if</span> <span class='lparen token'>(</span><span class='rubyid_type identifier id'>type</span> <span class='eq op'>==</span> <span class='symbol val'>:ipv4</span> <span class='andop op'>&amp;&amp;</span> <span class='notop op'>!</span><span class='rubyid_ip identifier id'>ip</span><span class='dot token'>.</span><span class='rubyid_ipv4? fid id'>ipv4?</span><span class='rparen token'>)</span> <span class='orop op'>||</span> <span class='lparen token'>(</span><span class='rubyid_type identifier id'>type</span> <span class='eq op'>==</span> <span class='symbol val'>:ipv6</span> <span class='andop op'>&amp;&amp;</span> <span class='notop op'>!</span><span class='rubyid_ip identifier id'>ip</span><span class='dot token'>.</span><span class='rubyid_ipv6? fid id'>ipv6?</span><span class='rparen token'>)</span>
1433
+
1434
+ <span class='lparen token'>(</span><span class='rubyid_self self kw'>self</span><span class='dot token'>.</span><span class='rubyid_config identifier id'>config</span><span class='dot token'>.</span><span class='rubyid_aliases identifier id'>aliases</span> <span class='gt op'>&gt;</span> <span class='integer val'>0</span> <span class='question op'>?</span> <span class='rubyid_self self kw'>self</span><span class='dot token'>.</span><span class='rubyid_config identifier id'>config</span><span class='dot token'>.</span><span class='rubyid_aliases identifier id'>aliases</span> <span class='colon op'>:</span> <span class='integer val'>5</span><span class='rparen token'>)</span><span class='dot token'>.</span><span class='rubyid_times identifier id'>times</span> <span class='rubyid_do do kw'>do</span>
1435
+ <span class='rubyid_rv identifier id'>rv</span> <span class='lshft op'>&lt;&lt;</span> <span class='rubyid_ip identifier id'>ip</span><span class='dot token'>.</span><span class='rubyid_to_s identifier id'>to_s</span>
1436
+ <span class='rubyid_ip identifier id'>ip</span> <span class='assign token'>=</span> <span class='rubyid_ip identifier id'>ip</span><span class='dot token'>.</span><span class='rubyid_succ identifier id'>succ</span>
1437
+ <span class='rubyid_end end kw'>end</span>
1438
+ <span class='rubyid_rescue rescue kw'>rescue</span> <span class='rubyid_ArgumentError constant id'>ArgumentError</span>
1439
+ <span class='rubyid_end end kw'>end</span>
1440
+ <span class='rubyid_end end kw'>end</span>
1441
+
1442
+ <span class='rubyid_rv identifier id'>rv</span>
1443
+ <span class='rubyid_end end kw'>end</span>
1444
+ </pre>
1435
1445
  </td>
1436
1446
  </tr>
1437
1447
  </table>
@@ -1505,9 +1515,10 @@
1505
1515
  <td>
1506
1516
  <pre class="code"><span class="info file"># File 'lib/akaer/application.rb', line 128</span>
1507
1517
 
1508
- <span class='kw'>def</span> <span class='id identifier rubyid_execute_command'>execute_command</span><span class='lparen'>(</span><span class='id identifier rubyid_command'>command</span><span class='rparen'>)</span>
1509
- <span class='const'>Kernel</span><span class='period'>.</span><span class='id identifier rubyid_system'>system</span><span class='lparen'>(</span><span class='id identifier rubyid_command'>command</span><span class='rparen'>)</span>
1510
- <span class='kw'>end</span></pre>
1518
+ <span class='rubyid_def def kw'>def</span> <span class='rubyid_execute_command identifier id'>execute_command</span><span class='lparen token'>(</span><span class='rubyid_command identifier id'>command</span><span class='rparen token'>)</span>
1519
+ <span class='rubyid_Kernel constant id'>Kernel</span><span class='dot token'>.</span><span class='rubyid_system identifier id'>system</span><span class='lparen token'>(</span><span class='rubyid_command identifier id'>command</span><span class='rparen token'>)</span>
1520
+ <span class='rubyid_end end kw'>end</span>
1521
+ </pre>
1511
1522
  </td>
1512
1523
  </tr>
1513
1524
  </table>
@@ -1562,9 +1573,10 @@
1562
1573
  <td>
1563
1574
  <pre class="code"><span class="info file"># File 'lib/akaer/application.rb', line 112</span>
1564
1575
 
1565
- <span class='kw'>def</span> <span class='id identifier rubyid_get_logger'>get_logger</span>
1566
- <span class='ivar'>@logger</span> <span class='op'>||=</span> <span class='const'>Bovem</span><span class='op'>::</span><span class='const'>Logger</span><span class='period'>.</span><span class='id identifier rubyid_create'>create</span><span class='lparen'>(</span><span class='const'>Bovem</span><span class='op'>::</span><span class='const'>Logger</span><span class='period'>.</span><span class='id identifier rubyid_default_file'>default_file</span><span class='comma'>,</span> <span class='ivar'>@config</span><span class='period'>.</span><span class='id identifier rubyid_log_level'>log_level</span><span class='comma'>,</span> <span class='ivar'>@log_formatter</span><span class='rparen'>)</span>
1567
- <span class='kw'>end</span></pre>
1576
+ <span class='rubyid_def def kw'>def</span> <span class='rubyid_get_logger identifier id'>get_logger</span>
1577
+ <span class='rubyid_@logger ivar id'>@logger</span> <span class='opasgn op'>||=</span> <span class='rubyid_Bovem constant id'>Bovem</span><span class='colon2 op'>::</span><span class='rubyid_Logger constant id'>Logger</span><span class='dot token'>.</span><span class='rubyid_create identifier id'>create</span><span class='lparen token'>(</span><span class='rubyid_Bovem constant id'>Bovem</span><span class='colon2 op'>::</span><span class='rubyid_Logger constant id'>Logger</span><span class='dot token'>.</span><span class='rubyid_default_file identifier id'>default_file</span><span class='comma token'>,</span> <span class='rubyid_@config ivar id'>@config</span><span class='dot token'>.</span><span class='rubyid_log_level identifier id'>log_level</span><span class='comma token'>,</span> <span class='rubyid_@log_formatter ivar id'>@log_formatter</span><span class='rparen token'>)</span>
1578
+ <span class='rubyid_end end kw'>end</span>
1579
+ </pre>
1568
1580
  </td>
1569
1581
  </tr>
1570
1582
  </table>
@@ -1641,12 +1653,13 @@
1641
1653
  <td>
1642
1654
  <pre class="code"><span class="info file"># File 'lib/akaer/application.rb', line 71</span>
1643
1655
 
1644
- <span class='kw'>def</span> <span class='id identifier rubyid_is_ipv4?'>is_ipv4?</span><span class='lparen'>(</span><span class='id identifier rubyid_address'>address</span><span class='rparen'>)</span>
1645
- <span class='id identifier rubyid_address'>address</span> <span class='op'>=</span> <span class='id identifier rubyid_address'>address</span><span class='period'>.</span><span class='id identifier rubyid_ensure_string'>ensure_string</span>
1656
+ <span class='rubyid_def def kw'>def</span> <span class='rubyid_is_ipv4? fid id'>is_ipv4?</span><span class='lparen token'>(</span><span class='rubyid_address identifier id'>address</span><span class='rparen token'>)</span>
1657
+ <span class='rubyid_address identifier id'>address</span> <span class='assign token'>=</span> <span class='rubyid_address identifier id'>address</span><span class='dot token'>.</span><span class='rubyid_ensure_string identifier id'>ensure_string</span>
1646
1658
 
1647
- <span class='id identifier rubyid_mo'>mo</span> <span class='op'>=</span> <span class='tstring'><span class='regexp_beg'>/</span><span class='tstring_content'>\A(\d{1,3})\.(\d{1,3})\.(\d{1,3})\.(\d{1,3})\Z</span><span class='regexp_end'>/</span></span><span class='period'>.</span><span class='id identifier rubyid_match'>match</span><span class='lparen'>(</span><span class='id identifier rubyid_address'>address</span><span class='rparen'>)</span>
1648
- <span class='id identifier rubyid_rv'>rv</span> <span class='op'>=</span> <span class='lparen'>(</span><span class='id identifier rubyid_mo'>mo</span> <span class='op'>&amp;&amp;</span> <span class='id identifier rubyid_mo'>mo</span><span class='period'>.</span><span class='id identifier rubyid_captures'>captures</span><span class='period'>.</span><span class='id identifier rubyid_all?'>all?</span> <span class='lbrace'>{</span><span class='op'>|</span><span class='id identifier rubyid_i'>i</span><span class='op'>|</span> <span class='id identifier rubyid_i'>i</span><span class='period'>.</span><span class='id identifier rubyid_to_i'>to_i</span> <span class='op'>&lt;</span> <span class='int'>256</span><span class='rbrace'>}</span><span class='rparen'>)</span> <span class='op'>?</span> <span class='kw'>true</span> <span class='op'>:</span> <span class='kw'>false</span>
1649
- <span class='kw'>end</span></pre>
1659
+ <span class='rubyid_mo identifier id'>mo</span> <span class='assign token'>=</span> <span class='regexp val'>/\A(\d{1,3})\.(\d{1,3})\.(\d{1,3})\.(\d{1,3})\Z/</span><span class='dot token'>.</span><span class='rubyid_match identifier id'>match</span><span class='lparen token'>(</span><span class='rubyid_address identifier id'>address</span><span class='rparen token'>)</span>
1660
+ <span class='rubyid_rv identifier id'>rv</span> <span class='assign token'>=</span> <span class='lparen token'>(</span><span class='rubyid_mo identifier id'>mo</span> <span class='andop op'>&amp;&amp;</span> <span class='rubyid_mo identifier id'>mo</span><span class='dot token'>.</span><span class='rubyid_captures identifier id'>captures</span><span class='dot token'>.</span><span class='rubyid_all? fid id'>all?</span> <span class='lbrace token'>{</span><span class='bitor op'>|</span><span class='rubyid_i identifier id'>i</span><span class='bitor op'>|</span> <span class='rubyid_i identifier id'>i</span><span class='dot token'>.</span><span class='rubyid_to_i identifier id'>to_i</span> <span class='lt op'>&lt;</span> <span class='integer val'>256</span><span class='rbrace token'>}</span><span class='rparen token'>)</span> <span class='question op'>?</span> <span class='rubyid_true true kw'>true</span> <span class='colon op'>:</span> <span class='rubyid_false false kw'>false</span>
1661
+ <span class='rubyid_end end kw'>end</span>
1662
+ </pre>
1650
1663
  </td>
1651
1664
  </tr>
1652
1665
  </table>
@@ -1733,22 +1746,23 @@
1733
1746
  <td>
1734
1747
  <pre class="code"><span class="info file"># File 'lib/akaer/application.rb', line 82</span>
1735
1748
 
1736
- <span class='kw'>def</span> <span class='id identifier rubyid_is_ipv6?'>is_ipv6?</span><span class='lparen'>(</span><span class='id identifier rubyid_address'>address</span><span class='rparen'>)</span>
1737
- <span class='id identifier rubyid_address'>address</span> <span class='op'>=</span> <span class='id identifier rubyid_address'>address</span><span class='period'>.</span><span class='id identifier rubyid_ensure_string'>ensure_string</span>
1738
-
1739
- <span class='id identifier rubyid_rv'>rv</span> <span class='op'>=</span> <span class='id identifier rubyid_catch'>catch</span><span class='lparen'>(</span><span class='symbol'>:valid</span><span class='rparen'>)</span> <span class='kw'>do</span>
1740
- <span class='comment'># IPv6 (normal)
1741
- </span> <span class='id identifier rubyid_throw'>throw</span><span class='lparen'>(</span><span class='symbol'>:valid</span><span class='comma'>,</span> <span class='kw'>true</span><span class='rparen'>)</span> <span class='kw'>if</span> <span class='tstring'><span class='regexp_beg'>/</span><span class='tstring_content'>\A[\dA-Fa-f]{1,4}(:[\dA-Fa-f]{1,4})*\Z</span><span class='regexp_end'>/</span></span> <span class='op'>=~</span> <span class='id identifier rubyid_address'>address</span>
1742
- <span class='id identifier rubyid_throw'>throw</span><span class='lparen'>(</span><span class='symbol'>:valid</span><span class='comma'>,</span> <span class='kw'>true</span><span class='rparen'>)</span> <span class='kw'>if</span> <span class='tstring'><span class='regexp_beg'>/</span><span class='tstring_content'>\A[\dA-Fa-f]{1,4}(:[\dA-Fa-f]{1,4})*::([\dA-Fa-f]{1,4}(:[\dA-Fa-f]{1,4})*)?\Z</span><span class='regexp_end'>/</span></span> <span class='op'>=~</span> <span class='id identifier rubyid_address'>address</span>
1743
- <span class='id identifier rubyid_throw'>throw</span><span class='lparen'>(</span><span class='symbol'>:valid</span><span class='comma'>,</span> <span class='kw'>true</span><span class='rparen'>)</span> <span class='kw'>if</span> <span class='tstring'><span class='regexp_beg'>/</span><span class='tstring_content'>\A::([\dA-Fa-f]{1,4}(:[\dA-Fa-f]{1,4})*)?\Z</span><span class='regexp_end'>/</span></span> <span class='op'>=~</span> <span class='id identifier rubyid_address'>address</span>
1744
- <span class='comment'># IPv6 (IPv4 compat)
1745
- </span> <span class='id identifier rubyid_throw'>throw</span><span class='lparen'>(</span><span class='symbol'>:valid</span><span class='comma'>,</span> <span class='kw'>true</span><span class='rparen'>)</span> <span class='kw'>if</span> <span class='tstring'><span class='regexp_beg'>/</span><span class='tstring_content'>\A[\dA-Fa-f]{1,4}(:[\dA-Fa-f]{1,4})*:</span><span class='regexp_end'>/</span></span> <span class='op'>=~</span> <span class='id identifier rubyid_address'>address</span> <span class='op'>&amp;&amp;</span> <span class='kw'>self</span><span class='period'>.</span><span class='id identifier rubyid_is_ipv4?'>is_ipv4?</span><span class='lparen'>(</span><span class='backref'>$'</span><span class='rparen'>)</span>
1746
- <span class='id identifier rubyid_throw'>throw</span><span class='lparen'>(</span><span class='symbol'>:valid</span><span class='comma'>,</span> <span class='kw'>true</span><span class='rparen'>)</span> <span class='kw'>if</span> <span class='tstring'><span class='regexp_beg'>/</span><span class='tstring_content'>\A[\dA-Fa-f]{1,4}(:[\dA-Fa-f]{1,4})*::([\dA-Fa-f]{1,4}(:[\dA-Fa-f]{1,4})*:)?</span><span class='regexp_end'>/</span></span> <span class='op'>=~</span> <span class='id identifier rubyid_address'>address</span> <span class='op'>&amp;&amp;</span> <span class='kw'>self</span><span class='period'>.</span><span class='id identifier rubyid_is_ipv4?'>is_ipv4?</span><span class='lparen'>(</span><span class='backref'>$'</span><span class='rparen'>)</span>
1747
- <span class='id identifier rubyid_throw'>throw</span><span class='lparen'>(</span><span class='symbol'>:valid</span><span class='comma'>,</span> <span class='kw'>true</span><span class='rparen'>)</span> <span class='kw'>if</span> <span class='tstring'><span class='regexp_beg'>/</span><span class='tstring_content'>\A::([\dA-Fa-f]{1,4}(:[\dA-Fa-f]{1,4})*:)?</span><span class='regexp_end'>/</span></span> <span class='op'>=~</span> <span class='id identifier rubyid_address'>address</span> <span class='op'>&amp;&amp;</span> <span class='kw'>self</span><span class='period'>.</span><span class='id identifier rubyid_is_ipv4?'>is_ipv4?</span><span class='lparen'>(</span><span class='backref'>$'</span><span class='rparen'>)</span>
1748
-
1749
- <span class='kw'>false</span>
1750
- <span class='kw'>end</span>
1751
- <span class='kw'>end</span></pre>
1749
+ <span class='rubyid_def def kw'>def</span> <span class='rubyid_is_ipv6? fid id'>is_ipv6?</span><span class='lparen token'>(</span><span class='rubyid_address identifier id'>address</span><span class='rparen token'>)</span>
1750
+ <span class='rubyid_address identifier id'>address</span> <span class='assign token'>=</span> <span class='rubyid_address identifier id'>address</span><span class='dot token'>.</span><span class='rubyid_ensure_string identifier id'>ensure_string</span>
1751
+
1752
+ <span class='rubyid_rv identifier id'>rv</span> <span class='assign token'>=</span> <span class='rubyid_catch identifier id'>catch</span><span class='lparen token'>(</span><span class='symbol val'>:valid</span><span class='rparen token'>)</span> <span class='rubyid_do do kw'>do</span>
1753
+ <span class='comment val'># IPv6 (normal)</span>
1754
+ <span class='rubyid_throw identifier id'>throw</span><span class='lparen token'>(</span><span class='symbol val'>:valid</span><span class='comma token'>,</span> <span class='rubyid_true true kw'>true</span><span class='rparen token'>)</span> <span class='rubyid_if if_mod kw'>if</span> <span class='regexp val'>/\A[\dA-Fa-f]{1,4}(:[\dA-Fa-f]{1,4})*\Z/</span> <span class='match op'>=~</span> <span class='rubyid_address identifier id'>address</span>
1755
+ <span class='rubyid_throw identifier id'>throw</span><span class='lparen token'>(</span><span class='symbol val'>:valid</span><span class='comma token'>,</span> <span class='rubyid_true true kw'>true</span><span class='rparen token'>)</span> <span class='rubyid_if if_mod kw'>if</span> <span class='regexp val'>/\A[\dA-Fa-f]{1,4}(:[\dA-Fa-f]{1,4})*::([\dA-Fa-f]{1,4}(:[\dA-Fa-f]{1,4})*)?\Z/</span> <span class='match op'>=~</span> <span class='rubyid_address identifier id'>address</span>
1756
+ <span class='rubyid_throw identifier id'>throw</span><span class='lparen token'>(</span><span class='symbol val'>:valid</span><span class='comma token'>,</span> <span class='rubyid_true true kw'>true</span><span class='rparen token'>)</span> <span class='rubyid_if if_mod kw'>if</span> <span class='regexp val'>/\A::([\dA-Fa-f]{1,4}(:[\dA-Fa-f]{1,4})*)?\Z/</span> <span class='match op'>=~</span> <span class='rubyid_address identifier id'>address</span>
1757
+ <span class='comment val'># IPv6 (IPv4 compat)</span>
1758
+ <span class='rubyid_throw identifier id'>throw</span><span class='lparen token'>(</span><span class='symbol val'>:valid</span><span class='comma token'>,</span> <span class='rubyid_true true kw'>true</span><span class='rparen token'>)</span> <span class='rubyid_if if_mod kw'>if</span> <span class='regexp val'>/\A[\dA-Fa-f]{1,4}(:[\dA-Fa-f]{1,4})*:/</span> <span class='match op'>=~</span> <span class='rubyid_address identifier id'>address</span> <span class='andop op'>&amp;&amp;</span> <span class='rubyid_self self kw'>self</span><span class='dot token'>.</span><span class='rubyid_is_ipv4? fid id'>is_ipv4?</span><span class='lparen token'>(</span><span class='rubyid_$' back_ref id'>$'</span><span class='rparen token'>)</span>
1759
+ <span class='rubyid_throw identifier id'>throw</span><span class='lparen token'>(</span><span class='symbol val'>:valid</span><span class='comma token'>,</span> <span class='rubyid_true true kw'>true</span><span class='rparen token'>)</span> <span class='rubyid_if if_mod kw'>if</span> <span class='regexp val'>/\A[\dA-Fa-f]{1,4}(:[\dA-Fa-f]{1,4})*::([\dA-Fa-f]{1,4}(:[\dA-Fa-f]{1,4})*:)?/</span> <span class='match op'>=~</span> <span class='rubyid_address identifier id'>address</span> <span class='andop op'>&amp;&amp;</span> <span class='rubyid_self self kw'>self</span><span class='dot token'>.</span><span class='rubyid_is_ipv4? fid id'>is_ipv4?</span><span class='lparen token'>(</span><span class='rubyid_$' back_ref id'>$'</span><span class='rparen token'>)</span>
1760
+ <span class='rubyid_throw identifier id'>throw</span><span class='lparen token'>(</span><span class='symbol val'>:valid</span><span class='comma token'>,</span> <span class='rubyid_true true kw'>true</span><span class='rparen token'>)</span> <span class='rubyid_if if_mod kw'>if</span> <span class='regexp val'>/\A::([\dA-Fa-f]{1,4}(:[\dA-Fa-f]{1,4})*:)?/</span> <span class='match op'>=~</span> <span class='rubyid_address identifier id'>address</span> <span class='andop op'>&amp;&amp;</span> <span class='rubyid_self self kw'>self</span><span class='dot token'>.</span><span class='rubyid_is_ipv4? fid id'>is_ipv4?</span><span class='lparen token'>(</span><span class='rubyid_$' back_ref id'>$'</span><span class='rparen token'>)</span>
1761
+
1762
+ <span class='rubyid_false false kw'>false</span>
1763
+ <span class='rubyid_end end kw'>end</span>
1764
+ <span class='rubyid_end end kw'>end</span>
1765
+ </pre>
1752
1766
  </td>
1753
1767
  </tr>
1754
1768
  </table>
@@ -1805,9 +1819,10 @@
1805
1819
  <td>
1806
1820
  <pre class="code"><span class="info file"># File 'lib/akaer/application.rb', line 63</span>
1807
1821
 
1808
- <span class='kw'>def</span> <span class='id identifier rubyid_is_osx?'>is_osx?</span>
1809
- <span class='op'>::</span><span class='const'>Config</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>
1810
- <span class='kw'>end</span></pre>
1822
+ <span class='rubyid_def def kw'>def</span> <span class='rubyid_is_osx? fid id'>is_osx?</span>
1823
+ <span class='colon3 op'>::</span><span class='rubyid_Config constant id'>Config</span><span class='colon2 op'>::</span><span class='rubyid_CONFIG constant id'>CONFIG</span><span class='lbrack token'>[</span><span class='string val'>'host_os'</span><span class='rbrack token'>]</span> <span class='match op'>=~</span> <span class='regexp val'>/^darwin/</span>
1824
+ <span class='rubyid_end end kw'>end</span>
1825
+ </pre>
1811
1826
  </td>
1812
1827
  </tr>
1813
1828
  </table>
@@ -1883,9 +1898,10 @@
1883
1898
  <td>
1884
1899
  <pre class="code"><span class="info file"># File 'lib/akaer/application.rb', line 120</span>
1885
1900
 
1886
- <span class='kw'>def</span> <span class='id identifier rubyid_launch_agent_path'>launch_agent_path</span><span class='lparen'>(</span><span class='id identifier rubyid_name'>name</span> <span class='op'>=</span> <span class='tstring'><span class='tstring_beg'>&quot;</span><span class='tstring_content'>it.cowtech.akaer</span><span class='tstring_end'>&quot;</span></span><span class='rparen'>)</span>
1887
- <span class='const'>ENV</span><span class='lbracket'>[</span><span class='tstring'><span class='tstring_beg'>&quot;</span><span class='tstring_content'>HOME</span><span class='tstring_end'>&quot;</span></span><span class='rbracket'>]</span> <span class='op'>+</span> <span class='tstring'><span class='tstring_beg'>&quot;</span><span class='tstring_content'>/Library/LaunchAgents/</span><span class='embexpr_beg'>#{</span><span class='id identifier rubyid_name'>name</span><span class='rbrace'>}</span><span class='tstring_content'>.plist</span><span class='tstring_end'>&quot;</span></span>
1888
- <span class='kw'>end</span></pre>
1901
+ <span class='rubyid_def def kw'>def</span> <span class='rubyid_launch_agent_path identifier id'>launch_agent_path</span><span class='lparen token'>(</span><span class='rubyid_name identifier id'>name</span> <span class='assign token'>=</span> <span class='string val'>&quot;it.cowtech.akaer&quot;</span><span class='rparen token'>)</span>
1902
+ <span class='rubyid_ENV constant id'>ENV</span><span class='lbrack token'>[</span><span class='string val'>&quot;HOME&quot;</span><span class='rbrack token'>]</span> <span class='plus op'>+</span> <span class='dstring node'>&quot;/Library/LaunchAgents/#{name}.plist&quot;</span>
1903
+ <span class='rubyid_end end kw'>end</span>
1904
+ </pre>
1889
1905
  </td>
1890
1906
  </tr>
1891
1907
  </table>
@@ -1997,32 +2013,33 @@
1997
2013
  <td>
1998
2014
  <pre class="code"><span class="info file"># File 'lib/akaer/application.rb', line 168</span>
1999
2015
 
2000
- <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>
2001
- <span class='id identifier rubyid_rv'>rv</span> <span class='op'>=</span> <span class='kw'>true</span>
2002
-
2003
- <span class='comment'># Compute the command
2004
- </span> <span class='id identifier rubyid_command'>command</span> <span class='op'>=</span> <span class='lparen'>(</span><span class='id identifier rubyid_type'>type</span> <span class='op'>==</span> <span class='symbol'>:remove</span><span class='rparen'>)</span> <span class='op'>?</span> <span class='kw'>self</span><span class='period'>.</span><span class='id identifier rubyid_config'>config</span><span class='period'>.</span><span class='id identifier rubyid_remove_command'>remove_command</span> <span class='op'>:</span> <span class='kw'>self</span><span class='period'>.</span><span class='id identifier rubyid_config'>config</span><span class='period'>.</span><span class='id identifier rubyid_add_command'>add_command</span>
2005
-
2006
- <span class='comment'># Interpolate
2007
- </span> <span class='id identifier rubyid_command'>command</span> <span class='op'>=</span> <span class='id identifier rubyid_command'>command</span><span class='period'>.</span><span class='id identifier rubyid_gsub'>gsub</span><span class='lparen'>(</span><span class='tstring'><span class='tstring_beg'>&quot;</span><span class='tstring_content'>@INTERFACE@</span><span class='tstring_end'>&quot;</span></span><span class='comma'>,</span> <span class='kw'>self</span><span class='period'>.</span><span class='id identifier rubyid_config'>config</span><span class='period'>.</span><span class='id identifier rubyid_interface'>interface</span><span class='rparen'>)</span><span class='period'>.</span><span class='id identifier rubyid_gsub'>gsub</span><span class='lparen'>(</span><span class='tstring'><span class='tstring_beg'>&quot;</span><span class='tstring_content'>@ALIAS@</span><span class='tstring_end'>&quot;</span></span><span class='comma'>,</span> <span class='id identifier rubyid_address'>address</span><span class='rparen'>)</span> <span class='op'>+</span> <span class='tstring'><span class='tstring_beg'>&quot;</span><span class='tstring_content'> &gt; /dev/null 2&gt;&amp;1</span><span class='tstring_end'>&quot;</span></span>
2008
-
2009
- <span class='comment'># Compute the prefix
2010
- </span> <span class='ivar'>@addresses</span> <span class='op'>||=</span> <span class='kw'>self</span><span class='period'>.</span><span class='id identifier rubyid_compute_addresses'>compute_addresses</span>
2011
- <span class='id identifier rubyid_length'>length</span> <span class='op'>=</span> <span class='kw'>self</span><span class='period'>.</span><span class='id identifier rubyid_pad_number'>pad_number</span><span class='lparen'>(</span><span class='ivar'>@addresses</span><span class='period'>.</span><span class='id identifier rubyid_length'>length</span><span class='rparen'>)</span>
2012
- <span class='id identifier rubyid_index'>index</span> <span class='op'>=</span> <span class='lparen'>(</span><span class='ivar'>@addresses</span><span class='period'>.</span><span class='id identifier rubyid_index'>index</span><span class='lparen'>(</span><span class='id identifier rubyid_address'>address</span><span class='rparen'>)</span> <span class='op'>||</span> <span class='int'>0</span><span class='rparen'>)</span> <span class='op'>+</span> <span class='int'>1</span>
2013
- <span class='id identifier rubyid_prefix'>prefix</span> <span class='op'>=</span> <span class='tstring'><span class='tstring_beg'>&quot;</span><span class='tstring_content'>{mark=blue}[{mark=bright white}</span><span class='embexpr_beg'>#{</span><span class='kw'>self</span><span class='period'>.</span><span class='id identifier rubyid_pad_number'>pad_number</span><span class='lparen'>(</span><span class='id identifier rubyid_index'>index</span><span class='comma'>,</span> <span class='id identifier rubyid_length'>length</span><span class='period'>.</span><span class='id identifier rubyid_length'>length</span><span class='rparen'>)</span><span class='rbrace'>}</span><span class='tstring_content'>{mark=reset blue}/{/mark}</span><span class='embexpr_beg'>#{</span><span class='id identifier rubyid_length'>length</span><span class='rbrace'>}</span><span class='tstring_content'>{/mark}]{/mark}</span><span class='tstring_end'>&quot;</span></span>
2014
-
2015
- <span class='comment'># Now execute
2016
- </span> <span class='kw'>if</span> <span class='op'>!</span><span class='kw'>self</span><span class='period'>.</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>
2017
- <span class='ivar'>@logger</span><span class='period'>.</span><span class='id identifier rubyid_info'>info</span><span class='lparen'>(</span><span class='ivar'>@command</span><span class='period'>.</span><span class='id identifier rubyid_application'>application</span><span class='period'>.</span><span class='id identifier rubyid_console'>console</span><span class='period'>.</span><span class='id identifier rubyid_replace_markers'>replace_markers</span><span class='lparen'>(</span><span class='tstring'><span class='tstring_beg'>&quot;</span><span class='embexpr_beg'>#{</span><span class='id identifier rubyid_prefix'>prefix</span><span class='rbrace'>}</span><span class='tstring_content'> {mark=bright}</span><span class='embexpr_beg'>#{</span><span class='lparen'>(</span><span class='id identifier rubyid_type'>type</span> <span class='op'>==</span> <span class='symbol'>:remove</span> <span class='op'>?</span> <span class='tstring'><span class='tstring_beg'>&quot;</span><span class='tstring_content'>Removing</span><span class='tstring_end'>&quot;</span></span> <span class='op'>:</span> <span class='tstring'><span class='tstring_beg'>&quot;</span><span class='tstring_content'>Adding</span><span class='tstring_end'>&quot;</span></span><span class='rparen'>)</span><span class='rbrace'>}</span><span class='tstring_content'>{/mark} address {mark=bright}</span><span class='embexpr_beg'>#{</span><span class='id identifier rubyid_address'>address</span><span class='rbrace'>}</span><span class='tstring_content'>{/mark} </span><span class='embexpr_beg'>#{</span><span class='id identifier rubyid_type'>type</span> <span class='op'>!=</span> <span class='symbol'>:remove</span> <span class='op'>?</span> <span class='tstring'><span class='tstring_beg'>&quot;</span><span class='tstring_content'>to</span><span class='tstring_end'>&quot;</span></span> <span class='op'>:</span> <span class='tstring'><span class='tstring_beg'>&quot;</span><span class='tstring_content'>from</span><span class='tstring_end'>&quot;</span></span><span class='rbrace'>}</span><span class='tstring_content'> interface {mark=bright}</span><span class='embexpr_beg'>#{</span><span class='kw'>self</span><span class='period'>.</span><span class='id identifier rubyid_config'>config</span><span class='period'>.</span><span class='id identifier rubyid_interface'>interface</span><span class='rbrace'>}</span><span class='tstring_content'>{/mark}...</span><span class='tstring_end'>&quot;</span></span><span class='rparen'>)</span><span class='rparen'>)</span> <span class='kw'>if</span> <span class='op'>!</span><span class='kw'>self</span><span class='period'>.</span><span class='id identifier rubyid_config'>config</span><span class='period'>.</span><span class='id identifier rubyid_quiet'>quiet</span>
2018
- <span class='id identifier rubyid_rv'>rv</span> <span class='op'>=</span> <span class='kw'>self</span><span class='period'>.</span><span class='id identifier rubyid_execute_command'>execute_command</span><span class='lparen'>(</span><span class='id identifier rubyid_command'>command</span><span class='rparen'>)</span>
2019
- <span class='ivar'>@logger</span><span class='period'>.</span><span class='id identifier rubyid_error'>error</span><span class='lparen'>(</span><span class='ivar'>@command</span><span class='period'>.</span><span class='id identifier rubyid_application'>application</span><span class='period'>.</span><span class='id identifier rubyid_console'>console</span><span class='period'>.</span><span class='id identifier rubyid_replace_markers'>replace_markers</span><span class='lparen'>(</span><span class='tstring'><span class='tstring_beg'>&quot;</span><span class='tstring_content'>Cannot {mark=bright}</span><span class='embexpr_beg'>#{</span><span class='lparen'>(</span><span class='id identifier rubyid_type'>type</span> <span class='op'>==</span> <span class='symbol'>:remove</span> <span class='op'>?</span> <span class='tstring'><span class='tstring_beg'>&quot;</span><span class='tstring_content'>remove</span><span class='tstring_end'>&quot;</span></span> <span class='op'>:</span> <span class='tstring'><span class='tstring_beg'>&quot;</span><span class='tstring_content'>add</span><span class='tstring_end'>&quot;</span></span><span class='rparen'>)</span><span class='rbrace'>}</span><span class='tstring_content'>{/mark} address {mark=bright}</span><span class='embexpr_beg'>#{</span><span class='id identifier rubyid_address'>address</span><span class='rbrace'>}</span><span class='tstring_content'>{/mark} </span><span class='embexpr_beg'>#{</span><span class='id identifier rubyid_type'>type</span> <span class='op'>!=</span> <span class='symbol'>:remove</span> <span class='op'>?</span> <span class='tstring'><span class='tstring_beg'>&quot;</span><span class='tstring_content'>to</span><span class='tstring_end'>&quot;</span></span> <span class='op'>:</span> <span class='tstring'><span class='tstring_beg'>&quot;</span><span class='tstring_content'>from</span><span class='tstring_end'>&quot;</span></span><span class='rbrace'>}</span><span class='tstring_content'> interface {mark=bright}</span><span class='embexpr_beg'>#{</span><span class='kw'>self</span><span class='period'>.</span><span class='id identifier rubyid_config'>config</span><span class='period'>.</span><span class='id identifier rubyid_interface'>interface</span><span class='rbrace'>}</span><span class='tstring_content'>{/mark}.</span><span class='tstring_end'>&quot;</span></span><span class='rparen'>)</span><span class='rparen'>)</span> <span class='kw'>if</span> <span class='op'>!</span><span class='id identifier rubyid_rv'>rv</span>
2020
- <span class='kw'>else</span>
2021
- <span class='ivar'>@logger</span><span class='period'>.</span><span class='id identifier rubyid_info'>info</span><span class='lparen'>(</span><span class='ivar'>@command</span><span class='period'>.</span><span class='id identifier rubyid_application'>application</span><span class='period'>.</span><span class='id identifier rubyid_console'>console</span><span class='period'>.</span><span class='id identifier rubyid_replace_markers'>replace_markers</span><span class='lparen'>(</span><span class='tstring'><span class='tstring_beg'>&quot;</span><span class='embexpr_beg'>#{</span><span class='id identifier rubyid_prefix'>prefix</span><span class='rbrace'>}</span><span class='tstring_content'> I will {mark=bright}</span><span class='embexpr_beg'>#{</span><span class='lparen'>(</span><span class='id identifier rubyid_type'>type</span> <span class='op'>==</span> <span class='symbol'>:remove</span> <span class='op'>?</span> <span class='tstring'><span class='tstring_beg'>&quot;</span><span class='tstring_content'>remove</span><span class='tstring_end'>&quot;</span></span> <span class='op'>:</span> <span class='tstring'><span class='tstring_beg'>&quot;</span><span class='tstring_content'>add</span><span class='tstring_end'>&quot;</span></span><span class='rparen'>)</span><span class='rbrace'>}</span><span class='tstring_content'>{/mark} address {mark=bright}</span><span class='embexpr_beg'>#{</span><span class='id identifier rubyid_address'>address</span><span class='rbrace'>}</span><span class='tstring_content'>{/mark} </span><span class='embexpr_beg'>#{</span><span class='id identifier rubyid_type'>type</span> <span class='op'>!=</span> <span class='symbol'>:remove</span> <span class='op'>?</span> <span class='tstring'><span class='tstring_beg'>&quot;</span><span class='tstring_content'>to</span><span class='tstring_end'>&quot;</span></span> <span class='op'>:</span> <span class='tstring'><span class='tstring_beg'>&quot;</span><span class='tstring_content'>from</span><span class='tstring_end'>&quot;</span></span><span class='rbrace'>}</span><span class='tstring_content'> interface {mark=bright}</span><span class='embexpr_beg'>#{</span><span class='kw'>self</span><span class='period'>.</span><span class='id identifier rubyid_config'>config</span><span class='period'>.</span><span class='id identifier rubyid_interface'>interface</span><span class='rbrace'>}</span><span class='tstring_content'>{/mark}.</span><span class='tstring_end'>&quot;</span></span><span class='rparen'>)</span><span class='rparen'>)</span> <span class='kw'>if</span> <span class='op'>!</span><span class='kw'>self</span><span class='period'>.</span><span class='id identifier rubyid_config'>config</span><span class='period'>.</span><span class='id identifier rubyid_quiet'>quiet</span>
2022
- <span class='kw'>end</span>
2023
-
2024
- <span class='id identifier rubyid_rv'>rv</span>
2025
- <span class='kw'>end</span></pre>
2016
+ <span class='rubyid_def def kw'>def</span> <span class='rubyid_manage identifier id'>manage</span><span class='lparen token'>(</span><span class='rubyid_type identifier id'>type</span><span class='comma token'>,</span> <span class='rubyid_address identifier id'>address</span><span class='rparen token'>)</span>
2017
+ <span class='rubyid_rv identifier id'>rv</span> <span class='assign token'>=</span> <span class='rubyid_true true kw'>true</span>
2018
+
2019
+ <span class='comment val'># Compute the command</span>
2020
+ <span class='rubyid_command identifier id'>command</span> <span class='assign token'>=</span> <span class='lparen token'>(</span><span class='rubyid_type identifier id'>type</span> <span class='eq op'>==</span> <span class='symbol val'>:remove</span><span class='rparen token'>)</span> <span class='question op'>?</span> <span class='rubyid_self self kw'>self</span><span class='dot token'>.</span><span class='rubyid_config identifier id'>config</span><span class='dot token'>.</span><span class='rubyid_remove_command identifier id'>remove_command</span> <span class='colon op'>:</span> <span class='rubyid_self self kw'>self</span><span class='dot token'>.</span><span class='rubyid_config identifier id'>config</span><span class='dot token'>.</span><span class='rubyid_add_command identifier id'>add_command</span>
2021
+
2022
+ <span class='comment val'># Interpolate</span>
2023
+ <span class='rubyid_command identifier id'>command</span> <span class='assign token'>=</span> <span class='rubyid_command identifier id'>command</span><span class='dot token'>.</span><span class='rubyid_gsub identifier id'>gsub</span><span class='lparen token'>(</span><span class='string val'>&quot;@INTERFACE@&quot;</span><span class='comma token'>,</span> <span class='rubyid_self self kw'>self</span><span class='dot token'>.</span><span class='rubyid_config identifier id'>config</span><span class='dot token'>.</span><span class='rubyid_interface identifier id'>interface</span><span class='rparen token'>)</span><span class='dot token'>.</span><span class='rubyid_gsub identifier id'>gsub</span><span class='lparen token'>(</span><span class='string val'>&quot;@ALIAS@&quot;</span><span class='comma token'>,</span> <span class='rubyid_address identifier id'>address</span><span class='rparen token'>)</span> <span class='plus op'>+</span> <span class='string val'>&quot; &gt; /dev/null 2&gt;&amp;1&quot;</span>
2024
+
2025
+ <span class='comment val'># Compute the prefix</span>
2026
+ <span class='rubyid_@addresses ivar id'>@addresses</span> <span class='opasgn op'>||=</span> <span class='rubyid_self self kw'>self</span><span class='dot token'>.</span><span class='rubyid_compute_addresses identifier id'>compute_addresses</span>
2027
+ <span class='rubyid_length identifier id'>length</span> <span class='assign token'>=</span> <span class='rubyid_self self kw'>self</span><span class='dot token'>.</span><span class='rubyid_pad_number identifier id'>pad_number</span><span class='lparen token'>(</span><span class='rubyid_@addresses ivar id'>@addresses</span><span class='dot token'>.</span><span class='rubyid_length identifier id'>length</span><span class='rparen token'>)</span>
2028
+ <span class='rubyid_index identifier id'>index</span> <span class='assign token'>=</span> <span class='lparen token'>(</span><span class='rubyid_@addresses ivar id'>@addresses</span><span class='dot token'>.</span><span class='rubyid_index identifier id'>index</span><span class='lparen token'>(</span><span class='rubyid_address identifier id'>address</span><span class='rparen token'>)</span> <span class='orop op'>||</span> <span class='integer val'>0</span><span class='rparen token'>)</span> <span class='plus op'>+</span> <span class='integer val'>1</span>
2029
+ <span class='rubyid_prefix identifier id'>prefix</span> <span class='assign token'>=</span> <span class='dstring node'>&quot;{mark=blue}[{mark=bright white}#{self.pad_number(index, length.length)}{mark=reset blue}/{/mark}#{length}{/mark}]{/mark}&quot;</span>
2030
+
2031
+ <span class='comment val'># Now execute</span>
2032
+ <span class='rubyid_if if kw'>if</span> <span class='notop op'>!</span><span class='rubyid_self self kw'>self</span><span class='dot token'>.</span><span class='rubyid_config identifier id'>config</span><span class='dot token'>.</span><span class='rubyid_dry_run identifier id'>dry_run</span> <span class='rubyid_then then kw'>then</span>
2033
+ <span class='rubyid_@logger ivar id'>@logger</span><span class='dot token'>.</span><span class='rubyid_info identifier id'>info</span><span class='lparen token'>(</span><span class='rubyid_@command ivar id'>@command</span><span class='dot token'>.</span><span class='rubyid_application identifier id'>application</span><span class='dot token'>.</span><span class='rubyid_console identifier id'>console</span><span class='dot token'>.</span><span class='rubyid_replace_markers identifier id'>replace_markers</span><span class='lparen token'>(</span><span class='dstring node'>&quot;#{prefix} {mark=bright}#{(type == :remove ? &quot;Removing&quot; : &quot;Adding&quot;)}{/mark} address {mark=bright}#{address}{/mark} #{type != :remove ? &quot;to&quot; : &quot;from&quot;} interface {mark=bright}#{self.config.interface}{/mark}...&quot;</span><span class='rparen token'>)</span><span class='rparen token'>)</span> <span class='rubyid_if if_mod kw'>if</span> <span class='notop op'>!</span><span class='rubyid_self self kw'>self</span><span class='dot token'>.</span><span class='rubyid_config identifier id'>config</span><span class='dot token'>.</span><span class='rubyid_quiet identifier id'>quiet</span>
2034
+ <span class='rubyid_rv identifier id'>rv</span> <span class='assign token'>=</span> <span class='rubyid_self self kw'>self</span><span class='dot token'>.</span><span class='rubyid_execute_command identifier id'>execute_command</span><span class='lparen token'>(</span><span class='rubyid_command identifier id'>command</span><span class='rparen token'>)</span>
2035
+ <span class='rubyid_@logger ivar id'>@logger</span><span class='dot token'>.</span><span class='rubyid_error identifier id'>error</span><span class='lparen token'>(</span><span class='rubyid_@command ivar id'>@command</span><span class='dot token'>.</span><span class='rubyid_application identifier id'>application</span><span class='dot token'>.</span><span class='rubyid_console identifier id'>console</span><span class='dot token'>.</span><span class='rubyid_replace_markers identifier id'>replace_markers</span><span class='lparen token'>(</span><span class='dstring node'>&quot;Cannot {mark=bright}#{(type == :remove ? &quot;remove&quot; : &quot;add&quot;)}{/mark} address {mark=bright}#{address}{/mark} #{type != :remove ? &quot;to&quot; : &quot;from&quot;} interface {mark=bright}#{self.config.interface}{/mark}.&quot;</span><span class='rparen token'>)</span><span class='rparen token'>)</span> <span class='rubyid_if if_mod kw'>if</span> <span class='notop op'>!</span><span class='rubyid_rv identifier id'>rv</span>
2036
+ <span class='rubyid_else else kw'>else</span>
2037
+ <span class='rubyid_@logger ivar id'>@logger</span><span class='dot token'>.</span><span class='rubyid_info identifier id'>info</span><span class='lparen token'>(</span><span class='rubyid_@command ivar id'>@command</span><span class='dot token'>.</span><span class='rubyid_application identifier id'>application</span><span class='dot token'>.</span><span class='rubyid_console identifier id'>console</span><span class='dot token'>.</span><span class='rubyid_replace_markers identifier id'>replace_markers</span><span class='lparen token'>(</span><span class='dstring node'>&quot;#{prefix} I will {mark=bright}#{(type == :remove ? &quot;remove&quot; : &quot;add&quot;)}{/mark} address {mark=bright}#{address}{/mark} #{type != :remove ? &quot;to&quot; : &quot;from&quot;} interface {mark=bright}#{self.config.interface}{/mark}.&quot;</span><span class='rparen token'>)</span><span class='rparen token'>)</span> <span class='rubyid_if if_mod kw'>if</span> <span class='notop op'>!</span><span class='rubyid_self self kw'>self</span><span class='dot token'>.</span><span class='rubyid_config identifier id'>config</span><span class='dot token'>.</span><span class='rubyid_quiet identifier id'>quiet</span>
2038
+ <span class='rubyid_end end kw'>end</span>
2039
+
2040
+ <span class='rubyid_rv identifier id'>rv</span>
2041
+ <span class='rubyid_end end kw'>end</span>
2042
+ </pre>
2026
2043
  </td>
2027
2044
  </tr>
2028
2045
  </table>
@@ -2113,9 +2130,10 @@
2113
2130
  <td>
2114
2131
  <pre class="code"><span class="info file"># File 'lib/akaer/application.rb', line 105</span>
2115
2132
 
2116
- <span class='kw'>def</span> <span class='id identifier rubyid_pad_number'>pad_number</span><span class='lparen'>(</span><span class='id identifier rubyid_num'>num</span><span class='comma'>,</span> <span class='id identifier rubyid_len'>len</span> <span class='op'>=</span> <span class='kw'>nil</span><span class='rparen'>)</span>
2117
- <span class='id identifier rubyid_num'>num</span><span class='period'>.</span><span class='id identifier rubyid_to_integer'>to_integer</span><span class='period'>.</span><span class='id identifier rubyid_to_s'>to_s</span><span class='period'>.</span><span class='id identifier rubyid_rjust'>rjust</span><span class='lparen'>(</span><span class='lbracket'>[</span><span class='id identifier rubyid_len'>len</span><span class='period'>.</span><span class='id identifier rubyid_to_integer'>to_integer</span><span class='comma'>,</span> <span class='int'>2</span><span class='rbracket'>]</span><span class='period'>.</span><span class='id identifier rubyid_max'>max</span><span class='comma'>,</span> <span class='tstring'><span class='tstring_beg'>&quot;</span><span class='tstring_content'>0</span><span class='tstring_end'>&quot;</span></span><span class='rparen'>)</span>
2118
- <span class='kw'>end</span></pre>
2133
+ <span class='rubyid_def def kw'>def</span> <span class='rubyid_pad_number identifier id'>pad_number</span><span class='lparen token'>(</span><span class='rubyid_num identifier id'>num</span><span class='comma token'>,</span> <span class='rubyid_len identifier id'>len</span> <span class='assign token'>=</span> <span class='rubyid_nil nil kw'>nil</span><span class='rparen token'>)</span>
2134
+ <span class='rubyid_num identifier id'>num</span><span class='dot token'>.</span><span class='rubyid_to_integer identifier id'>to_integer</span><span class='dot token'>.</span><span class='rubyid_to_s identifier id'>to_s</span><span class='dot token'>.</span><span class='rubyid_rjust identifier id'>rjust</span><span class='lparen token'>(</span><span class='lbrack token'>[</span><span class='rubyid_len identifier id'>len</span><span class='dot token'>.</span><span class='rubyid_to_integer identifier id'>to_integer</span><span class='comma token'>,</span> <span class='integer val'>2</span><span class='rbrack token'>]</span><span class='dot token'>.</span><span class='rubyid_max identifier id'>max</span><span class='comma token'>,</span> <span class='string val'>&quot;0&quot;</span><span class='rparen token'>)</span>
2135
+ <span class='rubyid_end end kw'>end</span>
2136
+ </pre>
2119
2137
  </td>
2120
2138
  </tr>
2121
2139
  </table>
@@ -2126,9 +2144,9 @@
2126
2144
  </div>
2127
2145
 
2128
2146
  <div id="footer">
2129
- Generated on Wed Aug 22 10:39:50 2012 by
2147
+ Generated on Sat Oct 6 08:55:20 2012 by
2130
2148
  <a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
2131
- 0.8.2.1 (ruby-1.9.2).
2149
+ 0.8.2.1 (ruby-1.8.7).
2132
2150
  </div>
2133
2151
 
2134
2152
  </body>