Sha256: dafb317c43cf8168ac55dc4498ca15c0bce7ac8b3e64e4ea444b8bb5e4e207da
Contents?: true
Size: 508 Bytes
Versions: 4
Compression:
Stored size: 508 Bytes
Contents
# frozen_string_literal: true require_relative "../command" module Expire module Commands # Remove files and directories class Remove < Expire::Command def initialize(path:) @path = path end attr_reader :path def execute(output: $stdout) begin Expire.remove(path) rescue Errno::ENOENT => e output.puts "can't remove #{path}: #{e}" exit 1 end output.puts "removed #{path}" end end end end
Version data entries
4 entries across 4 versions & 1 rubygems
Version | Path |
---|---|
expire-0.2.6 | lib/expire/commands/remove.rb |
expire-0.2.5 | lib/expire/commands/remove.rb |
expire-0.2.4 | lib/expire/commands/remove.rb |
expire-0.2.3 | lib/expire/commands/remove.rb |