Method: OptParseValidator::OptPath#check_directory

Defined in:
lib/opt_parse_validator/opts/path.rb

#check_directory(path) ⇒ Object

Parameters:

  • path (Pathname)

Raises:



46
47
48
# File 'lib/opt_parse_validator/opts/path.rb', line 46

def check_directory(path)
  raise Error, "The path '#{path}' does not exist or is not a directory" unless path.directory? || attrs[:exists] == false
end