Method: TTY::Command::Cmd#environment_string
- Defined in:
- lib/tty/command/cmd.rb
#environment_string ⇒ Object
This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.
81 82 83 84 85 86 87 |
# File 'lib/tty/command/cmd.rb', line 81 def environment_string environment.map do |key, val| converted_key = key.is_a?(Symbol) ? key.to_s.upcase : key.to_s escaped_val = val.to_s.gsub(/"/, '\"') %(#{converted_key}="#{escaped_val}") end.join(" ") end |