Class: OptParseValidator::OptDirectoryPath
- Defined in:
- lib/opt_parse_validator/opts/directory_path.rb
Overview
Implemetantion of the DirectoryPath Option
Instance Attribute Summary
Attributes inherited from OptBase
Instance Method Summary collapse
-
#initialize(option, attrs = {}) ⇒ OptDirectoryPath
constructor
A new instance of OptDirectoryPath.
Methods inherited from OptPath
#allowed_attrs, #check_directory, #check_executable, #check_file, #check_readable, #check_writable, #validate
Methods inherited from OptBase
#choices, #default, #normalize, #required?, #required_unless, #to_long, #to_s, #to_sym, #validate, #value_if_empty
Constructor Details
#initialize(option, attrs = {}) ⇒ OptDirectoryPath
Returns a new instance of OptDirectoryPath.
4 5 6 7 8 |
# File 'lib/opt_parse_validator/opts/directory_path.rb', line 4 def initialize(option, attrs = {}) super(option, attrs) @attrs.merge!(directory: true) end |