Sha256: 14d82321793c3e4572583466cccea4c7f677772e8a6644c1e2eab883a60095ad

Contents?: true

Size: 556 Bytes

Versions: 1

Compression:

Stored size: 556 Bytes

Contents

module Munge
  module Io
    # NoOp driver for writing files. This is used to compute dry-runs.
    class DryRun
      def initialize(driver)
        @driver = driver
      end

      # Pretends to write, but actually does nothing
      #
      # @param _abspath [String]
      # @param _content [String]
      def write(_abspath, _content)
      end

      def exist?(path)
        @driver.exist?(path)
      end

      def read(path)
        @driver.read(path)
      end

      def rm(_path)
      end

      def rmdir(_path)
      end
    end
  end
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
munge-0.18.0 lib/munge/io/dry_run.rb