Module: MPatch::YAML
- Defined in:
- lib/mpatch/yml.rb
Instance Method Summary collapse
Instance Method Details
#load_file(file_path) ⇒ Object
10 11 12 |
# File 'lib/mpatch/yml.rb', line 10 def load_file(file_path) ::YAML.load(File.open(file_path)) end |
#save_file(file_path, config_hash) ⇒ Object
6 7 8 |
# File 'lib/mpatch/yml.rb', line 6 def save_file(file_path,config_hash) File.open(file_path, 'w+') {|f| f.write(config_hash.to_yaml) } end |