Env
Undocumented
-
Return the list of all the enviromenment keys passed to the script
Declaration
Swift
public static var keys: [String]
-
Return the list of all the enviromenment values passed to the script
Declaration
Swift
public static var values: [String]
-
Return the enviromenment for the provided key
Declaration
Swift
public static func get(key: String) -> String?
Parameters
key
The enviromenment variable key
Return Value
The enviromenment variable value
-
Set a new value for the enviromenment variable
Declaration
Swift
public static func set(key: String, _ value: String?)
Parameters
key
The enviromenment variable key
value
The enviromenment variable value
-
Clear all the enviromenment variables
Declaration
Swift
public static func clear()
-
Check if the enviromenment variable key exists
Declaration
Swift
public static func hasKey(key: String) -> Bool
Parameters
key
The enviromenment variable key
Return Value
true if exists false otherwise
-
Check if the enviromenment variable value exists
Declaration
Swift
public static func hasValue(value: String) -> Bool
Parameters
key
The enviromenment variable value
Return Value
true if exists false otherwise
-
Iterate through the list of enviromenment variables
Declaration
Swift
public static func eachPair(callback: (key: String, value: String) -> ())
Parameters
callback
callback to call on each key/value pair