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
keyThe 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
keyThe enviromenment variable key
valueThe 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) -> BoolParameters
keyThe 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) -> BoolParameters
keyThe 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
callbackcallback to call on each key/value pair
View on GitHub
Env Class Reference