Method: Inspec.plugin

Defined in:
lib/inspec/plugin/v2.rb

.plugin(version, plugin_type = nil) ⇒ Object

Provides the base class that plugin implementors should use.



36
37
38
39
40
41
42
43
# File 'lib/inspec/plugin/v2.rb', line 36

def self.plugin(version, plugin_type = nil)
  unless version == 2
    raise 'Only plugins version 2 is supported!'
  end

  return Inspec::Plugin::V2::PluginBase if plugin_type.nil?
  Inspec::Plugin::V2::PluginBase.base_class_for_type(plugin_type)
end