Sha256: 2e4827b06ec1485b44535582d67a8d3685d1c44be0e927adcb519d9266289fe9

Contents?: true

Size: 315 Bytes

Versions: 6

Compression:

Stored size: 315 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

6 entries across 6 versions & 1 rubygems

Version Path
squib-0.15.3 lib/squib/args/dir_validator.rb
squib-0.15.0 lib/squib/args/dir_validator.rb
squib-0.14.3.pre1 lib/squib/args/dir_validator.rb
squib-0.14.1 lib/squib/args/dir_validator.rb
squib-0.14.0 lib/squib/args/dir_validator.rb
squib-0.14.beta1 lib/squib/args/dir_validator.rb