Class: Inspec::VendorIndex

Inherits:
Object
  • Object
show all
Defined in:
lib/inspec/dependencies.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(path) ⇒ VendorIndex

Returns a new instance of VendorIndex.



192
193
194
195
196
# File 'lib/inspec/dependencies.rb', line 192

def initialize(path)
  @path = path
  FileUtils.mkdir_p(path) unless File.directory?(path)
  @list = Dir[File.join(path, '*')].map { |x| load_path(x) }
end

Instance Attribute Details

#listObject (readonly)

Returns the value of attribute list.



191
192
193
# File 'lib/inspec/dependencies.rb', line 191

def list
  @list
end

#pathObject (readonly)

Returns the value of attribute path.



191
192
193
# File 'lib/inspec/dependencies.rb', line 191

def path
  @path
end

Instance Method Details

#find(_dependency) ⇒ Object



198
199
200
201
# File 'lib/inspec/dependencies.rb', line 198

def find(_dependency)
  # TODO
  fail NotImplementedError, '#find(dependency) on VendorIndex seeks implementation.'
end