Class: Aruba::Platforms::UnixEnvironmentVariables::RemoveAction

Inherits:
Object
  • Object
show all
Defined in:
lib/aruba/platforms/unix_environment_variables.rb

Overview

Remove variables from environment

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(variables) ⇒ RemoveAction

Returns a new instance of RemoveAction.


36
37
38
# File 'lib/aruba/platforms/unix_environment_variables.rb', line 36

def initialize(variables)
  @variables = Array(variables)
end

Instance Attribute Details

#variablesObject (readonly)

Returns the value of attribute variables


34
35
36
# File 'lib/aruba/platforms/unix_environment_variables.rb', line 34

def variables
  @variables
end

Instance Method Details

#call(env) ⇒ Object


40
41
42
43
44
# File 'lib/aruba/platforms/unix_environment_variables.rb', line 40

def call(env)
  variables.each { |v| env.delete v }

  env
end