Module: Braid::Operations
- Defined in:
- lib/braid/operations.rb,
lib/braid/operations_lite.rb
Defined Under Namespace
Modules: VersionControl Classes: Git, GitCache, LocalChangesPresent, MergeError, Proxy, ShellExecutionError, UnknownRevision, VersionTooLow
Class Method Summary collapse
Class Method Details
.with_modified_environment(dict) ⇒ Object
Want to use github.com/thoughtbot/climate_control ?
6 7 8 9 10 11 12 13 14 15 16 17 18 19 |
# File 'lib/braid/operations_lite.rb', line 6 def self.with_modified_environment(dict) orig_dict = {} dict.each { |name, value| orig_dict[name] = ENV[name] ENV[name] = value } begin yield ensure orig_dict.each { |name, orig_value| ENV[name] = orig_value } end end |