Class: LatexFlow::CLI::Archives
- Defined in:
- lib/latex-flow/cli/archives.rb
Instance Method Summary collapse
Methods inherited from Generic
Constructor Details
This class inherits a constructor from LatexFlow::CLI::Generic
Instance Method Details
#run ⇒ Object
6 7 8 9 10 11 12 13 14 15 16 |
# File 'lib/latex-flow/cli/archives.rb', line 6 def run Dir.glob(File.join('archives', '*.zip')).map{ |archive| basename = File.basename(archive) time = basename.scan(/\A.+\-(\d+)\..+\Z/).first.first.to_i [time, archive] }.sort_by{ |time, archive| time }.each do |time, archive| puts "#{Time.at(time.to_i)}\t#{archive}" end end |