Module: DevSuite::Utils::FileWriter

Defined in:
lib/dev_suite/utils/file_writer.rb,
lib/dev_suite/utils/file_writer/writer.rb,
lib/dev_suite/utils/file_writer/file_writer.rb,
lib/dev_suite/utils/file_writer/writer/base.rb,
lib/dev_suite/utils/file_writer/writer/json.rb,
lib/dev_suite/utils/file_writer/writer/text.rb,
lib/dev_suite/utils/file_writer/writer/yaml.rb,
lib/dev_suite/utils/file_writer/atomic_writer.rb,
lib/dev_suite/utils/file_writer/writer/writer.rb,
lib/dev_suite/utils/file_writer/backup_manager.rb,
lib/dev_suite/utils/file_writer/writer_manager.rb

Defined Under Namespace

Modules: Writer Classes: AtomicWriter, BackupManager, UnsupportedFileTypeError, WriterManager

Class Method Summary collapse

Class Method Details

.append(path, content) ⇒ Object



16
17
18
# File 'lib/dev_suite/utils/file_writer/file_writer.rb', line 16

def append(path, content)
  WriterManager.append(path, content)
end

.delete_key(path, key) ⇒ Object



28
29
30
# File 'lib/dev_suite/utils/file_writer/file_writer.rb', line 28

def delete_key(path, key)
  WriterManager.delete_key(path, key)
end

.delete_lines(path, start_line, end_line = start_line) ⇒ Object



20
21
22
# File 'lib/dev_suite/utils/file_writer/file_writer.rb', line 20

def delete_lines(path, start_line, end_line = start_line)
  WriterManager.delete_lines(path, start_line, end_line)
end

.update_key(path, key, value) ⇒ Object



24
25
26
# File 'lib/dev_suite/utils/file_writer/file_writer.rb', line 24

def update_key(path, key, value)
  WriterManager.update_key(path, key, value)
end

.write(path, content) ⇒ Object



12
13
14
# File 'lib/dev_suite/utils/file_writer/file_writer.rb', line 12

def write(path, content)
  WriterManager.write(path, content)
end