Class: Inspec::Plugin::V2::Status
- Inherits:
-
Struct
- Object
- Struct
- Inspec::Plugin::V2::Status
- 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
-
#activators ⇒ Object
Returns the value of attribute activators.
-
#api_generation ⇒ Object
Returns the value of attribute api_generation.
-
#description ⇒ Object
Returns the value of attribute description.
-
#entry_point ⇒ Object
Returns the value of attribute entry_point.
-
#installation_type ⇒ Object
Returns the value of attribute installation_type.
-
#load_exception ⇒ Object
Returns the value of attribute load_exception.
-
#loaded ⇒ Object
Returns the value of attribute loaded.
-
#name ⇒ Object
Returns the value of attribute name.
-
#plugin_class ⇒ Object
Returns the value of attribute plugin_class.
-
#version ⇒ Object
Returns the value of attribute version.
Instance Method Summary collapse
-
#initialize ⇒ Status
constructor
A new instance of Status.
- #plugin_types ⇒ Object
Constructor Details
#initialize ⇒ Status
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
#activators ⇒ Object
Returns the value of attribute activators
8 9 10 |
# File 'lib/inspec/plugin/v2/status.rb', line 8 def activators @activators end |
#api_generation ⇒ Object
Returns the value of attribute api_generation
8 9 10 |
# File 'lib/inspec/plugin/v2/status.rb', line 8 def api_generation @api_generation end |
#description ⇒ Object
Returns the value of attribute description
8 9 10 |
# File 'lib/inspec/plugin/v2/status.rb', line 8 def description @description end |
#entry_point ⇒ Object
Returns the value of attribute entry_point
8 9 10 |
# File 'lib/inspec/plugin/v2/status.rb', line 8 def entry_point @entry_point end |
#installation_type ⇒ Object
Returns the value of attribute installation_type
8 9 10 |
# File 'lib/inspec/plugin/v2/status.rb', line 8 def installation_type @installation_type end |
#load_exception ⇒ Object
Returns the value of attribute load_exception
8 9 10 |
# File 'lib/inspec/plugin/v2/status.rb', line 8 def load_exception @load_exception end |
#loaded ⇒ Object
Returns the value of attribute loaded
8 9 10 |
# File 'lib/inspec/plugin/v2/status.rb', line 8 def loaded @loaded end |
#name ⇒ Object
Returns the value of attribute name
8 9 10 |
# File 'lib/inspec/plugin/v2/status.rb', line 8 def name @name end |
#plugin_class ⇒ Object
Returns the value of attribute plugin_class
8 9 10 |
# File 'lib/inspec/plugin/v2/status.rb', line 8 def plugin_class @plugin_class end |
#version ⇒ Object
Returns the value of attribute version
8 9 10 |
# File 'lib/inspec/plugin/v2/status.rb', line 8 def version @version end |
Instance Method Details
#plugin_types ⇒ Object
26 27 28 |
# File 'lib/inspec/plugin/v2/status.rb', line 26 def plugin_types activators.map(&:plugin_type).uniq.sort end |