Sha256: dcf42e2fd42ec09741c556b9c20c83beba928fa211a0b540d20993ae14813243

Contents?: true

Size: 626 Bytes

Versions: 12

Compression:

Stored size: 626 Bytes

Contents

# frozen_string_literal: true

require_relative '../support/entry_group_fileable'

# This class is responsible for deleting an entry group file.
module Dsu
  module Services
    class EntryGroupDeleterService
      include Dsu::Support::EntryGroupFileable

      def initialize(time:, options: {})
        @time = time
        @options = options || {}
      end

      def call
        delete_entry_group_file!
      end

      private

      attr_reader :time, :options

      def delete_entry_group_file!
        return unless entry_group_file_exists?

        File.delete(entry_group_file_path)
      end
    end
  end
end

Version data entries

12 entries across 12 versions & 1 rubygems

Version Path
dsu-1.2.1 lib/dsu/services/entry_group_deleter_service.rb
dsu-1.2.0 lib/dsu/services/entry_group_deleter_service.rb
dsu-1.1.2 lib/dsu/services/entry_group_deleter_service.rb
dsu-1.1.1 lib/dsu/services/entry_group_deleter_service.rb
dsu-1.1.0.alpha.2 lib/dsu/services/entry_group_deleter_service.rb
dsu-1.1.0.alpha.1 lib/dsu/services/entry_group_deleter_service.rb
dsu-1.0.0 lib/dsu/services/entry_group_deleter_service.rb
dsu-0.1.0.alpha.5 lib/dsu/services/entry_group_deleter_service.rb
dsu-0.1.0.alpha.4 lib/dsu/services/entry_group_deleter_service.rb
dsu-0.1.0.alpha.3 lib/dsu/services/entry_group_deleter_service.rb
dsu-0.1.0.alpha.2 lib/dsu/services/entry_group_deleter_service.rb
dsu-0.1.0.alpha.1 lib/dsu/services/entry_group_deleter_service.rb