View Source Luminous.Helpers (luminous v0.1.0)

Link to this section Summary

Functions

interpolate all occurences of variable IDs in the format $variable.id in the string with the variable's descriptive value label

Link to this section Functions

Link to this function

interpolate(string, variables)

View Source
@spec interpolate(binary(), [Luminous.Variable.t()]) :: binary()

interpolate all occurences of variable IDs in the format $variable.id in the string with the variable's descriptive value label

e.g. the string: "Energy for asset $asset_var" will be replaced by the label of the variable with id :asset_var in variables