Sha256: 580652fdb81d2646999e5e375d12d3f44b621f198437da664cb4cbc980f7bfe2

Contents?: true

Size: 299 Bytes

Versions: 3

Compression:

Stored size: 299 Bytes

Contents

module Squib
  # @api private
  module Args
    module DirValidator

      def ensure_dir_created(dir)
        unless Dir.exists?(dir)
          Squib.logger.warn "Dir '#{dir}' does not exist, creating it."
          FileUtils.mkdir_p dir
        end
        return dir
      end

    end
  end
end

Version data entries

3 entries across 3 versions & 1 rubygems

Version Path
squib-0.15.2 lib/squib/args/dir_validator.rb
squib-0.15.1 lib/squib/args/dir_validator.rb
squib-0.14.2 lib/squib/args/dir_validator.rb