class Photocopier::Adapter
Attributes
logger[RW]
Public Instance Methods
delete(remote_path)
click to toggle source
# File lib/photocopier/adapter.rb, line 25 def delete(remote_path); end
get(remote_path, file_path = nil)
click to toggle source
# File lib/photocopier/adapter.rb, line 21 def get(remote_path, file_path = nil); end
get_directory(remote_path, local_path, exclude = [])
click to toggle source
# File lib/photocopier/adapter.rb, line 23 def get_directory(remote_path, local_path, exclude = []); end
put(file_path_or_string, remote_path)
click to toggle source
# File lib/photocopier/adapter.rb, line 5 def put(file_path_or_string, remote_path) if File.exist? file_path_or_string put_file(file_path_or_string, remote_path) else file = Tempfile.new('put') file.write file_path_or_string file.close put_file(file.path, remote_path) file.unlink end end
put_directory(local_path, remote_path, exclude = [])
click to toggle source
# File lib/photocopier/adapter.rb, line 19 def put_directory(local_path, remote_path, exclude = []); end
put_file(file_path, remote_path)
click to toggle source
# File lib/photocopier/adapter.rb, line 17 def put_file(file_path, remote_path); end
Protected Instance Methods
run(command)
click to toggle source
# File lib/photocopier/adapter.rb, line 29 def run(command) logger.info command if logger.present? system command end