Method: Inspec::DirProvider#initialize

Defined in:
lib/inspec/file_provider.rb

#initialize(path) ⇒ DirProvider

Returns a new instance of DirProvider.



71
72
73
74
75
76
77
78
# File 'lib/inspec/file_provider.rb', line 71

def initialize(path)
  @files = if File.file?(path)
             [path]
           else
             Dir[File.join(Shellwords.shellescape(path), '**', '*')]
           end
  @path = path
end