Sha256: d50d4d93ce03fba232f1c699b409493742b9a5f70b0caec873edf8e9ad34a2da

Contents?: true

Size: 406 Bytes

Versions: 4

Compression:

Stored size: 406 Bytes

Contents

# frozen_string_literal: true

require_relative "../command"

module Expire
  module Commands
    # Print the oldest backup
    class Oldest < Expire::Command
      def initialize(path, options)
        @path = path
        @options = options
      end

      attr_reader :path

      def execute(input: $stdin, output: $stdout)
        output.puts Expire.oldest(path).pathname
      end
    end
  end
end

Version data entries

4 entries across 4 versions & 1 rubygems

Version Path
expire-0.2.6 lib/expire/commands/oldest.rb
expire-0.2.5 lib/expire/commands/oldest.rb
expire-0.2.4 lib/expire/commands/oldest.rb
expire-0.2.3 lib/expire/commands/oldest.rb