Class: OsCtld::Assets::Directory
- Defined in:
- lib/osctld/assets/directory.rb
Instance Attribute Summary
Attributes inherited from Base
Instance Method Summary collapse
- #validate(run) ⇒ Object protected
Methods inherited from BaseFile
#exist?, #initialize, #mode, #stat
Methods inherited from Base
#add_error, #initialize, #prefetch_zfs, register, #run_validation, #state, #type, #valid?, #validate?, #validate_block
Constructor Details
This class inherits a constructor from OsCtld::Assets::BaseFile
Instance Method Details
#validate(run) ⇒ Object (protected)
9 10 11 12 13 14 15 16 17 |
# File 'lib/osctld/assets/directory.rb', line 9 def validate(run) begin add_error('not a directory') if exist? && !opts[:optional] && !stat.directory? rescue Errno::ENOENT add_error('does not exist') end super end |