Module: Ask::Tools::Shell::ApplyPatchOperations

Included in:
DefaultApplyPatchOperations
Defined in:
lib/ask/tools/shell/apply_patch.rb

Instance Method Summary collapse

Instance Method Details

#delete_file(path) ⇒ Object



25
26
27
# File 'lib/ask/tools/shell/apply_patch.rb', line 25

def delete_file(path)
  File.delete(path)
end

#expand_path(path) ⇒ Object



29
30
31
# File 'lib/ask/tools/shell/apply_patch.rb', line 29

def expand_path(path)
  File.expand_path(path)
end

#file?(path) ⇒ Boolean

Returns:

  • (Boolean)


21
22
23
# File 'lib/ask/tools/shell/apply_patch.rb', line 21

def file?(path)
  File.file?(path)
end

#file_exist?(path) ⇒ Boolean

Returns:

  • (Boolean)


17
18
19
# File 'lib/ask/tools/shell/apply_patch.rb', line 17

def file_exist?(path)
  File.exist?(path)
end

#mkdir_p(path) ⇒ Object



33
34
35
# File 'lib/ask/tools/shell/apply_patch.rb', line 33

def mkdir_p(path)
  FileUtils.mkdir_p(File.dirname(path))
end

#read_file(path) ⇒ Object



9
10
11
# File 'lib/ask/tools/shell/apply_patch.rb', line 9

def read_file(path)
  File.read(path)
end

#write_file(path, content) ⇒ Object



13
14
15
# File 'lib/ask/tools/shell/apply_patch.rb', line 13

def write_file(path, content)
  File.write(path, content)
end