Class: Cezanne::RemoteFiles
- Inherits:
-
Object
- Object
- Cezanne::RemoteFiles
- Defined in:
- lib/cezanne/remote_files.rb
Instance Method Summary collapse
- #exists?(key) ⇒ Boolean
-
#initialize(uid, base_path) ⇒ RemoteFiles
constructor
A new instance of RemoteFiles.
- #pull(key, path) ⇒ Object
- #push(path, key) ⇒ Object
Constructor Details
#initialize(uid, base_path) ⇒ RemoteFiles
Returns a new instance of RemoteFiles.
7 8 9 10 11 12 13 14 15 |
# File 'lib/cezanne/remote_files.rb', line 7 def initialize uid, base_path @remote_folders = { ref: File.join('reference_screenshots'), diff: File.join(uid, 'different_screenshots'), new: File.join(uid, 'new_screenshots') } @adapter = Dropscreen::Client.new( remote_base_dir: base_path, local_base_dir: './' ) end |
Instance Method Details
#exists?(key) ⇒ Boolean
25 26 27 |
# File 'lib/cezanne/remote_files.rb', line 25 def exists? key @adapter.exists? @remote_folders[key] end |
#pull(key, path) ⇒ Object
17 18 19 |
# File 'lib/cezanne/remote_files.rb', line 17 def pull key, path @adapter.pull @remote_folders[key], path end |
#push(path, key) ⇒ Object
21 22 23 |
# File 'lib/cezanne/remote_files.rb', line 21 def push path, key @adapter.push path, @remote_folders[key] end |