modules/sr/lib/serializers/implementations/yaml_serializer.rb
def save_file(file, data)
    puts "Saving to yaml file: #{file}" if $verbose
    begin
      File.open(file, 'w') do |f|
        f.write data.to_yaml
      end
    rescue StandardError
      puts "Error saving yaml file: #{file}. #{$ERROR_INFO}" if $verbose
      raise
    end
  end
# Save object to yaml file.
# Throw exception if there is an error.
Save object to yaml file.
Throw exception if there is an error.
Save object to yaml file . Throw exception if there is an error .
def save_file(file, data)
    puts "Saving to yaml file: #{file}" if $verbose
    begin
      File.open(file, 'w') do |f|
        f.write data.to_yaml
      end
    rescue StandardError
      puts "Error saving yaml file: #{file}. #{$ERROR_INFO}" if $verbose
      raise
    end
  end
def save_file ( file , data ) puts "Saving to yaml file: #{file}" if $verbose begin File . open ( file , 'w' ) do | f | f . write data . to_yaml end rescue StandardError puts "Error saving yaml file: #{file}. #{$ERROR_INFO}" if $verbose raise end end
Save object to yaml file.
Save object to yaml file .
file
data