Module: Backnob::Options

Defined in:
lib/backnob/options.rb

Overview

:nodoc: all

Instance Method Summary collapse

Instance Method Details

#sanitize!Object



6
7
8
9
10
11
12
13
14
15
# File 'lib/backnob/options.rb', line 6

def sanitize!
  self.symbolize_keys!
  self[:workers] = [self[:workers]].compact unless self[:workers].is_a?(Array)
  self[:workers].collect!{|f| Pathname.new(f).realpath.to_s } if self[:workers]
  
  if self[:listen]
    self[:listen] = 'druby://' + self[:listen] unless self[:listen] =~ /\:\/\//
    self[:listen] << ':6444' unless self[:listen] =~ /\:\d+/      
  end
end