Sha256: c1e06b49721ad44801514ce938e8a2b740606ec74dbf79a6492eaa3b74061476

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 newest backup
    class Newest < Expire::Command
      def initialize(path, options)
        @path = path
        @options = options
      end

      attr_reader :path

      def execute(input: $stdin, output: $stdout)
        output.puts Expire.newest(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/newest.rb
expire-0.2.5 lib/expire/commands/newest.rb
expire-0.2.4 lib/expire/commands/newest.rb
expire-0.2.3 lib/expire/commands/newest.rb