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.



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

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