Class: OmniAI::Tools::Disk::BaseDriver
- Inherits:
-
Object
- Object
- OmniAI::Tools::Disk::BaseDriver
- Defined in:
- lib/omniai/tools/disk/base_driver.rb
Overview
A driver for interacting with a disk via various operations
Direct Known Subclasses
Instance Method Summary collapse
- #directory_create(path:) ⇒ Object
- #directory_move(path:, destination:) ⇒ Object
- #directroy_delete(path:) ⇒ Object
- #file_create(path:) ⇒ Object
- #file_delete(path:) ⇒ Object
- #file_move(path:, destination:) ⇒ Object
- #file_read(path:) ⇒ String
- #file_replace(old_text:, new_text:, path:) ⇒ Object
- #file_write(path:, text:) ⇒ Object
-
#initialize(root:) ⇒ BaseDriver
constructor
A new instance of BaseDriver.
Constructor Details
#initialize(root:) ⇒ BaseDriver
Returns a new instance of BaseDriver.
11 12 13 |
# File 'lib/omniai/tools/disk/base_driver.rb', line 11 def initialize(root:) @root = Pathname(root) end |
Instance Method Details
#directory_create(path:) ⇒ Object
16 17 18 |
# File 'lib/omniai/tools/disk/base_driver.rb', line 16 def directory_create(path:) raise NotImplementedError, "#{self.class}#{__method__} undefined" end |
#directory_move(path:, destination:) ⇒ Object
27 28 29 |
# File 'lib/omniai/tools/disk/base_driver.rb', line 27 def directory_move(path:, destination:) raise NotImplementedError, "#{self.class}#{__method__} undefined" end |
#directroy_delete(path:) ⇒ Object
21 22 23 |
# File 'lib/omniai/tools/disk/base_driver.rb', line 21 def directroy_delete(path:) raise NotImplementedError, "#{self.class}#{__method__} undefined" end |
#file_create(path:) ⇒ Object
32 33 34 |
# File 'lib/omniai/tools/disk/base_driver.rb', line 32 def file_create(path:) raise NotImplementedError, "#{self.class}#{__method__} undefined" end |
#file_delete(path:) ⇒ Object
37 38 39 |
# File 'lib/omniai/tools/disk/base_driver.rb', line 37 def file_delete(path:) raise NotImplementedError, "#{self.class}#{__method__} undefined" end |
#file_move(path:, destination:) ⇒ Object
43 44 45 |
# File 'lib/omniai/tools/disk/base_driver.rb', line 43 def file_move(path:, destination:) raise NotImplementedError, "#{self.class}#{__method__} undefined" end |
#file_read(path:) ⇒ String
49 50 51 |
# File 'lib/omniai/tools/disk/base_driver.rb', line 49 def file_read(path:) raise NotImplementedError, "#{self.class}#{__method__} undefined" end |
#file_replace(old_text:, new_text:, path:) ⇒ Object
56 57 58 |
# File 'lib/omniai/tools/disk/base_driver.rb', line 56 def file_replace(old_text:, new_text:, path:) raise NotImplementedError, "#{self.class}#{__method__} undefined" end |
#file_write(path:, text:) ⇒ Object
62 63 64 |
# File 'lib/omniai/tools/disk/base_driver.rb', line 62 def file_write(path:, text:) raise NotImplementedError, "#{self.class}#{__method__} undefined" end |