Sha256: b8a3a9e2100691a66cb22e4198e9312c78dc20498e0b3ad73c512b851fdd0a0c

Contents?: true

Size: 458 Bytes

Versions: 6

Compression:

Stored size: 458 Bytes

Contents

# frozen_string_literal: true

class Rustic::Configs::Forget
  include Rustic::HooksExt

  attr_reader :keep_last, :keep_weekly, :keep_monthly, :prune

  def initialize
    @prune = false
  end

  def keep(last: nil, weekly: nil, monthly: nil)
    raise ArgumentError, "keep options must be provided" if [last, weekly, monthly].all?(&:nil?)

    @keep_last = last
    @keep_weekly = weekly
    @keep_monthly = monthly
  end

  def prune! = @prune = true
end

Version data entries

6 entries across 6 versions & 1 rubygems

Version Path
rustic-0.5.0 lib/rustic/configs/forget.rb
rustic-0.4.0 lib/rustic/configs/forget.rb
rustic-0.3.3 lib/rustic/configs/forget.rb
rustic-0.3.2 lib/rustic/configs/forget.rb
rustic-0.3.1 lib/rustic/configs/forget.rb
rustic-0.3.0 lib/rustic/configs/forget.rb