Class: 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.
-
#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
Methods inherited from Struct
Constructor Details
#initialize ⇒ Status
Returns a new instance of Status.
19 20 21 22 23 |
# File 'lib/inspec/plugin/v2/status.rb', line 19 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 |
#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
25 26 27 |
# File 'lib/inspec/plugin/v2/status.rb', line 25 def plugin_types activators.map(&:plugin_type).uniq.sort end |