Class: Wpxf::PathOption
- Defined in:
- lib/wpxf/core/opts/path_option.rb
Overview
A file system path option.
Instance Attribute Summary
Attributes inherited from Option
#advanced, #default, #desc, #enums, #evasion, #name, #regex, #required
Instance Method Summary collapse
-
#valid?(value) ⇒ Boolean
Check if the specified value is valid in the context of this option.
Methods inherited from Option
#advanced?, #display_value, #empty?, #empty_required_value?, #evasion?, #initialize, #normalize, #required?, #update_optional_attributes, #value?
Constructor Details
This class inherits a constructor from Wpxf::Option
Instance Method Details
#valid?(value) ⇒ Boolean
Check if the specified value is valid in the context of this option.
10 11 12 13 |
# File 'lib/wpxf/core/opts/path_option.rb', line 10 def valid?(value) return super if empty?(value) File.exist?(value) end |