module Aruba::Api::Environment
def append_environment_variable(name, value)
-
(self)
-
Parameters:
-
value
(String
) -- -
name
(String
) --
def append_environment_variable(name, value) name = name.to_s value = value.to_s old_environment = aruba.environment.to_h aruba.environment.append name, value new_environment = aruba.environment.to_h environment_change = { old: old_environment, new: new_environment, changed: { name: name, value: value } } aruba.event_bus.notify Events::ChangedEnvironmentVariable.new(environment_change) self end
def delete_environment_variable(name)
-
(self)
-
Parameters:
-
name
(String
) --
def delete_environment_variable(name) name = name.to_s old_environment = aruba.environment.to_h aruba.environment.delete name new_environment = aruba.environment.to_h environment_change = { old: old_environment, new: new_environment, changed: { name: name, value: "" } } aruba.event_bus.notify Events::ChangedEnvironmentVariable.new(environment_change) self end
def prepend_environment_variable(name, value)
-
(self)
-
Parameters:
-
value
(String
) -- -
name
(String
) --
def prepend_environment_variable(name, value) name = name.to_s value = value.to_s old_environment = aruba.environment.to_h aruba.environment.prepend name, value new_environment = aruba.environment.to_h environment_change = { old: old_environment, new: new_environment, changed: { name: name, value: value } } aruba.event_bus.notify Events::ChangedEnvironmentVariable.new(environment_change) self end
def set_environment_variable(name, value)
-
(self)
-
Parameters:
-
value
(String
) -- -
name
(String
) --
def set_environment_variable(name, value) name = name.to_s value = value.to_s old_environment = aruba.environment.to_h aruba.environment[name] = value new_environment = aruba.environment.to_h environment_change = { old: old_environment, new: new_environment, changed: { name: name, value: value } } aruba.event_bus.notify Events::AddedEnvironmentVariable.new(environment_change) self end