Sha256: 4d0e702d8cca17f0947ce07a23e4a7422fb7449b7e8e74b2759a795c9d0d4b57

Contents?: true

Size: 589 Bytes

Versions: 1

Compression:

Stored size: 589 Bytes

Contents

module Astrails
  module Safe
    class Stream

      attr_accessor :config, :backup
      def initialize(config, backup)
        @config, @backup = config, backup
      end
      # FIXME: move to Backup
      def expand(path)
        path .
        gsub(/:kind\b/, @backup.kind.to_s) .
        gsub(/:id\b/, @backup.id.to_s) .
        gsub(/:timestamp\b/, @backup.timestamp)
      end

      private

      def verbose?
        config[:verbose]
      end

      def local_only?
        config[:local_only]
      end

      def dry_run?
        config[:dry_run]
      end
    end
  end
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
akupchanko-astrails-safe-0.3.1 lib/astrails/safe/stream.rb