Class: Inspec::Plugin::V2::Activator

Inherits:
Struct
  • Object
show all
Defined in:
lib/inspec/plugin/v2/activator.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Methods inherited from Struct

#to_h

Constructor Details

#initializeActivator

Returns a new instance of Activator.



11
12
13
14
# File 'lib/inspec/plugin/v2/activator.rb', line 11

def initialize(*)
  super
  self[:'activated?'] = false
end

Instance Attribute Details

#activation_procObject

Returns the value of attribute activation_proc

Returns:

  • (Object)

    the current value of activation_proc



2
3
4
# File 'lib/inspec/plugin/v2/activator.rb', line 2

def activation_proc
  @activation_proc
end

#activator_nameObject

Returns the value of attribute activator_name

Returns:

  • (Object)

    the current value of activator_name



2
3
4
# File 'lib/inspec/plugin/v2/activator.rb', line 2

def activator_name
  @activator_name
end

#exceptionObject

Returns the value of attribute exception

Returns:

  • (Object)

    the current value of exception



2
3
4
# File 'lib/inspec/plugin/v2/activator.rb', line 2

def exception
  @exception
end

#implementation_classObject

Returns the value of attribute implementation_class

Returns:

  • (Object)

    the current value of implementation_class



2
3
4
# File 'lib/inspec/plugin/v2/activator.rb', line 2

def implementation_class
  @implementation_class
end

#plugin_nameObject

Returns the value of attribute plugin_name

Returns:

  • (Object)

    the current value of plugin_name



2
3
4
# File 'lib/inspec/plugin/v2/activator.rb', line 2

def plugin_name
  @plugin_name
end

#plugin_typeObject

Returns the value of attribute plugin_type

Returns:

  • (Object)

    the current value of plugin_type



2
3
4
# File 'lib/inspec/plugin/v2/activator.rb', line 2

def plugin_type
  @plugin_type
end

Instance Method Details

#activated?(new_value = nil) ⇒ Boolean

Returns:

  • (Boolean)


16
17
18
19
# File 'lib/inspec/plugin/v2/activator.rb', line 16

def activated?(new_value = nil)
  return self[:'activated?'] if new_value.nil?
  self[:'activated?'] = new_value
end