lib/esgob/config.rb
# Save Esgob configuration to file
# If no filepath is given, save to the default filepath
# @param [String] path Optional path to a configuration file
Save Esgob configuration to file
If no filepath is given, save to the default filepath
Save Esgob configuration to file If no filepath is given save to the default filepath
def save(path=nil)
    if !path.nil?
      self.filepath = path
    elsif filepath.nil?
      self.filepath = self.class.default_filepaths.first
    end
    File.open(filepath, 'wb') do |file|
      each_pair do |key,value|
        file.puts "#{key} #{value}"
      end
    end
  end
def save ( path = nil ) if ! path . nil? self . filepath = path elsif filepath . nil? self . filepath = self . class . default_filepaths . first end File . open ( filepath , 'wb' ) do | file | each_pair do | key , value | file . puts "#{key} #{value}" end end end
Save Esgob configuration to file
If no filepath is given, save to the default filepath
Save Esgob configuration to file If no filepath is given save to the default filepath
path
path Optional path to a configuration file
path Optional path to a configuration file