tasks/00_utils.rake
# Given the path to a yaml file, load the yaml file into an object and return
# the object.
Given the path to a yaml file, load the yaml file into an object and return
the object.
Given the path to a yaml file load the yaml file into an object and return the object .
def data_from_yaml(file)
  file = File.expand_path(file)
  begin
    input_data = YAML.load_file(file) || {}
  rescue => e
    STDERR.puts "There was an error loading data from #{file}."
    fail e.backtrace.join("\n")
  end
  input_data
end
def data_from_yaml ( file ) file = File . expand_path ( file ) begin input_data = YAML . load_file ( file ) || { } rescue => e STDERR . puts "There was an error loading data from #{file}." fail e . backtrace . join ( "\n" ) end input_data end
Given the path to a yaml file, load the yaml file into an object and return
the object.
Given the path to a yaml file load the yaml file into an object and return the object .
file
<not_specific>