Class: Inspec::Plugin::V2::Status

Inherits:
Struct
  • Object
show all
Defined in:
lib/inspec/plugin/v2/status.rb

Overview

Track loading status of each plugin. These are the elements of the Registry.

Lifecycle of an installed plugin:

If present in the config file, bundled, or core, it is "known"
All known plugins are loaded.  v1 plugins auto-activate. All loaded plugins know their version.
v2 plugins activate when they are used.  All activated plugins know their implementation class.

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initializeStatus

Returns a new instance of Status.



20
21
22
23
24
# File 'lib/inspec/plugin/v2/status.rb', line 20

def initialize(*)
  super
  self[:activators] = []
  self[:loaded] = false
end

Instance Attribute Details

#activatorsObject

Returns the value of attribute activators

Returns:

  • (Object)

    the current value of activators



8
9
10
# File 'lib/inspec/plugin/v2/status.rb', line 8

def activators
  @activators
end

#api_generationObject

Returns the value of attribute api_generation

Returns:

  • (Object)

    the current value of api_generation



8
9
10
# File 'lib/inspec/plugin/v2/status.rb', line 8

def api_generation
  @api_generation
end

#descriptionObject

Returns the value of attribute description

Returns:

  • (Object)

    the current value of description



8
9
10
# File 'lib/inspec/plugin/v2/status.rb', line 8

def description
  @description
end

#entry_pointObject

Returns the value of attribute entry_point

Returns:

  • (Object)

    the current value of entry_point



8
9
10
# File 'lib/inspec/plugin/v2/status.rb', line 8

def entry_point
  @entry_point
end

#installation_typeObject

Returns the value of attribute installation_type

Returns:

  • (Object)

    the current value of installation_type



8
9
10
# File 'lib/inspec/plugin/v2/status.rb', line 8

def installation_type
  @installation_type
end

#load_exceptionObject

Returns the value of attribute load_exception

Returns:

  • (Object)

    the current value of load_exception



8
9
10
# File 'lib/inspec/plugin/v2/status.rb', line 8

def load_exception
  @load_exception
end

#loadedObject

Returns the value of attribute loaded

Returns:

  • (Object)

    the current value of loaded



8
9
10
# File 'lib/inspec/plugin/v2/status.rb', line 8

def loaded
  @loaded
end

#nameObject

Returns the value of attribute name

Returns:

  • (Object)

    the current value of name



8
9
10
# File 'lib/inspec/plugin/v2/status.rb', line 8

def name
  @name
end

#plugin_classObject

Returns the value of attribute plugin_class

Returns:

  • (Object)

    the current value of plugin_class



8
9
10
# File 'lib/inspec/plugin/v2/status.rb', line 8

def plugin_class
  @plugin_class
end

#versionObject

Returns the value of attribute version

Returns:

  • (Object)

    the current value of version



8
9
10
# File 'lib/inspec/plugin/v2/status.rb', line 8

def version
  @version
end

Instance Method Details

#plugin_typesObject



26
27
28
# File 'lib/inspec/plugin/v2/status.rb', line 26

def plugin_types
  activators.map(&:plugin_type).uniq.sort
end