Module: Dire::Module::Validity
- Defined in:
- lib/dire/module/validity.rb
Instance Method Summary collapse
Instance Method Details
#validate! ⇒ Object
2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 |
# File 'lib/dire/module/validity.rb', line 2 def validate! begin if ignore? path raise Errno::ENOENT if ignore? path end path.lstat rescue Errno::ENOENT raise Dire::Error::InvalidPath, 'Not found' end unless inside? path raise Dire::Error::InvalidPath, 'Outside root' end true end |