module MPatch::Extend::YAML

Public Instance Methods

load_file(file_path) click to toggle source
# File lib/mpatch/yml.rb, line 12
def load_file(file_path)
  ::YAML.load(File.open(file_path))
end
save_file(file_path,config_hash) click to toggle source
# File lib/mpatch/yml.rb, line 8
def save_file(file_path,config_hash)
  File.open(file_path, 'w+') {|f| f.write(config_hash.to_yaml) }
end