Method: Nugrant::Helper::Env::Exporter.command

Defined in:
lib/nugrant/helper/env/exporter.rb

.command(type, key, value, options = {}) ⇒ Object

Given a key and a value, return a string representation of the command type requested. Available types:

* :export => A bash compatible export command
* :unset => A bash compatible export command

146
147
148
149
150
151
152
153
154
# File 'lib/nugrant/helper/env/exporter.rb', line 146

def self.command(type, key, value, options = {})
  # TODO: Replace by a map type => function name
  case
  when type == :export
    export_command(key, value, options)
  when type == :unset
    unset_command(key, value, options)
  end
end