Module: Inspec::Targets::DirsHelper
- Extended by:
- Modulator
- Defined in:
- lib/inspec/targets/dir.rb
Overview
DirsHelper manages resolvers for directories. Wherever directories are, either a local folder, archive, or remote, this module provides all helpers than can resolve these.
Resolvers provide these methods
-
handles?(paths) => true if the resolver is responsible for this target
-
get_filenames => Array of files where tests/controls are found
-
get_metadata => String path with metadata information [optional]
-
get_libraries => Array of library files [optional]
Resolvers must register with this DirsHelper via #add_module .
Class Method Summary collapse
Methods included from Modulator
Class Method Details
.get_handler(paths) ⇒ Object
20 21 22 |
# File 'lib/inspec/targets/dir.rb', line 20 def self.get_handler(paths) modules.values.reverse.find { |x| x.handles?(paths) } end |