Sha256: 486fde06d520bb6aaf0032cb6f8311345e3c330dcf7f123a04f134186bf9a71c

Contents?: true

Size: 307 Bytes

Versions: 8

Compression:

Stored size: 307 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."
          Dir.mkdir dir
        end
        return dir
      end

    end
  end
end

Version data entries

8 entries across 8 versions & 1 rubygems

Version Path
squib-0.13.4 lib/squib/args/dir_validator.rb
squib-0.13.3 lib/squib/args/dir_validator.rb
squib-0.13.2 lib/squib/args/dir_validator.rb
squib-0.13.1 lib/squib/args/dir_validator.rb
squib-0.13.0 lib/squib/args/dir_validator.rb
squib-0.12.0 lib/squib/args/dir_validator.rb
squib-0.11.0 lib/squib/args/dir_validator.rb
squib-0.10.0 lib/squib/args/dir_validator.rb