Module: FeduxOrgStdlib::Environment Deprecated
- Included in:
- Command::RunCommand
- Defined in:
- lib/fedux_org_stdlib/environment.rb
Overview
Deprecated.
Please use github.com/cucumber/aruba instead
Enviroment helpers
Instance Method Summary collapse
-
#isolated_environment(new_environment_variables, options = {}) { ... } ⇒ Object
(also: #with_environment)
Set environment variable for code block.
Instance Method Details
#isolated_environment(new_environment_variables, options = {}) { ... } ⇒ Object Also known as: with_environment
Set environment variable for code block
20 21 22 23 24 25 26 27 28 29 30 |
# File 'lib/fedux_org_stdlib/environment.rb', line 20 def isolated_environment(new_environment_variables, = {}, &block) old_environment = ENV.to_hash ENV.clear if [:clear] == true ENV.update new_environment_variables block.call ensure ENV.clear ENV.update old_environment end |