Class: Inspec::Plugin::V2::PluginType::Input
- Inherits:
-
Inspec::Plugin::V2::PluginBase
- Object
- Inspec::Plugin::V2::PluginBase
- Inspec::Plugin::V2::PluginType::Input
- Defined in:
- lib/inspec/plugin/v2/plugin_types/input.rb
Instance Method Summary collapse
-
#default_priority ⇒ Object
When an input is obtained from the plugin, this number determines what precedence to assign to the input.
-
#fetch(_profile_name, _input_name) ⇒ Object
Indicates an attempt is being made to read the value for an input.
-
#list_inputs(_profile) ⇒ Object
Given a profile name, list all input names for which the plugin would offer a response.
Methods inherited from Inspec::Plugin::V2::PluginBase
base_class_for_type, find_name_by_implementation_class, plugin_name, register_plugin_type, registry
Instance Method Details
#default_priority ⇒ Object
When an input is obtained from the plugin, this number determines what precedence to assign to the input.
13 14 15 |
# File 'lib/inspec/plugin/v2/plugin_types/input.rb', line 13 def default_priority 60 end |
#fetch(_profile_name, _input_name) ⇒ Object
Indicates an attempt is being made to read the value for an input. Return nil if the input is not supplied by the plugin, otherwise return the value.
21 22 23 |
# File 'lib/inspec/plugin/v2/plugin_types/input.rb', line 21 def fetch(_profile_name, _input_name) raise NotImplementedError, "Plugin #{plugin_name} must implement the #fetch method" end |
#list_inputs(_profile) ⇒ Object
Given a profile name, list all input names for which the plugin would offer a response. would offer a response.
30 31 32 |
# File 'lib/inspec/plugin/v2/plugin_types/input.rb', line 30 def list_inputs(_profile) raise NotImplementedError, "Plugin #{plugin_name} must implement the #list_inputs method" end |