Module: Ask::Tools::Shell::EditOperations
- Included in:
- DefaultEditOperations
- Defined in:
- lib/ask/tools/shell/edit.rb
Overview
Pluggable operations for the Edit tool.
Instance Method Summary collapse
- #expand_path(path) ⇒ Object
- #file?(path) ⇒ Boolean
- #file_exist?(path) ⇒ Boolean
- #file_size(path) ⇒ Object
- #read_file(path) ⇒ Object
- #write_file(path, content) ⇒ Object
Instance Method Details
#expand_path(path) ⇒ Object
28 29 30 |
# File 'lib/ask/tools/shell/edit.rb', line 28 def (path) File.(path) end |
#file?(path) ⇒ Boolean
20 21 22 |
# File 'lib/ask/tools/shell/edit.rb', line 20 def file?(path) File.file?(path) end |
#file_exist?(path) ⇒ Boolean
16 17 18 |
# File 'lib/ask/tools/shell/edit.rb', line 16 def file_exist?(path) File.exist?(path) end |
#file_size(path) ⇒ Object
24 25 26 |
# File 'lib/ask/tools/shell/edit.rb', line 24 def file_size(path) File.size(path) end |
#read_file(path) ⇒ Object
8 9 10 |
# File 'lib/ask/tools/shell/edit.rb', line 8 def read_file(path) File.read(path) end |
#write_file(path, content) ⇒ Object
12 13 14 |
# File 'lib/ask/tools/shell/edit.rb', line 12 def write_file(path, content) File.write(path, content) end |