Class: Inspec::Plugins::SourceReader

Inherits:
PluginRegistry::Plugin show all
Defined in:
lib/inspec/plugin/v1/plugin_types/source_reader.rb

Instance Attribute Summary

Attributes inherited from PluginRegistry::Plugin

#parent, #target

Class Method Summary collapse

Instance Method Summary collapse

Methods inherited from PluginRegistry::Plugin

name, priority, resolve, resolve_next

Class Method Details

.plugin_registryObject



6
7
8
# File 'lib/inspec/plugin/v1/plugin_types/source_reader.rb', line 6

def self.plugin_registry
  Inspec::SourceReader
end

Instance Method Details

#librariesHash

Retrieve this profile’s libraries

Returns:

  • (Hash)

    Collection with references pointing to library contents



31
32
33
# File 'lib/inspec/plugin/v1/plugin_types/source_reader.rb', line 31

def libraries
  raise "SourceReader #{self} does not implement `libraries()`. This method is required"
end

#metadataInspec::Metadata

Retrieve this profile’s metadata.

Returns:



13
14
15
# File 'lib/inspec/plugin/v1/plugin_types/source_reader.rb', line 13

def 
  raise "SourceReader #{self} does not implement `metadata()`. This method is required"
end

#testsHash

Retrieve this profile’s tests

“tests” here refers to a test file. Individual controls and anonymous tests are later extracted from the raw contents of a test file. The map her simply maps from a test file name to the file contents.

Returns:

  • (Hash)

    Collection with references pointing to test contents



24
25
26
# File 'lib/inspec/plugin/v1/plugin_types/source_reader.rb', line 24

def tests
  raise "SourceReader #{self} does not implement `tests()`. This method is required"
end