class ProxyTester::Actions::ClearEnvironment

Attributes

variables[R]

Public Class Methods

new(options = {}) click to toggle source
# File lib/proxy_tester/actions/clear_environment.rb, line 12
def initialize(options = {})
  @variables = options.fetch(:variables, %w{ http_proxy https_proxy HTTP_PROXY HTTPS_PROXY })
end

Public Instance Methods

run() click to toggle source
# File lib/proxy_tester/actions/clear_environment.rb, line 16
def run
  variables.each { |var| ENV.delete(var) }
end