Sha256: b991416126809f67da3e264dd06ac6b3602626989b502749fec4ce7b51f4dd72
Contents?: true
Size: 646 Bytes
Versions: 2
Compression:
Stored size: 646 Bytes
Contents
require 'command' require 'commands/look' require 'lookfile' # Command 'lookfile restore' implementation class Restore < Command def self.options_messages %( restore \t $ lookfile restore \t\t - Restore files from lookfile to user pc ) end def self.command_name 'restore' end def self.parent Look end def self.run(*) files_path = [] Lookfile.list_files.each do |file_path| print "Restore file #{file_path} (Y/n): " option = $stdin.gets.chomp.upcase option = 'Y' if option.empty? files_path << file_path if option == 'Y' end puts Lookfile.restore(files_path) end end
Version data entries
2 entries across 2 versions & 1 rubygems
Version | Path |
---|---|
lookfile-0.1.5 | lib/commands/restore.rb |
lookfile-0.1.4 | lib/commands/restore.rb |