Class: DevSuite::Utils::FileWriter::Writer::Yaml
- Inherits:
-
Base
- Object
- Construct::Component::Base
- Base
- DevSuite::Utils::FileWriter::Writer::Yaml
- Defined in:
- lib/dev_suite/utils/file_writer/writer/yaml.rb
Instance Attribute Summary
Attributes inherited from Base
Instance Method Summary collapse
Methods inherited from Base
#append, #append_array, #delete_key, #delete_lines, #initialize, #read, #update_key
Methods inherited from Construct::Component::Base
Constructor Details
This class inherits a constructor from DevSuite::Utils::FileWriter::Writer::Base
Instance Method Details
#write(content, normalize: false, backup: false, yaml_options: {}) ⇒ Object
8 9 10 11 12 13 14 |
# File 'lib/dev_suite/utils/file_writer/writer/yaml.rb', line 8 def write(content, normalize: false, backup: false, yaml_options: {}) validate_content(content) create_backup(path) if backup yaml_content = prepare_yaml_content(content, normalize, ) AtomicWriter.new(path, yaml_content).write end |