Normandy.Tools.Examples.ListProcessor
(normandy v0.6.2)
View Source
A tool for processing lists with various operations.
Examples
iex> tool = %Normandy.Tools.Examples.ListProcessor{operation: "sum", numbers: [1, 2, 3, 4, 5]}
iex> Normandy.Tools.BaseTool.run(tool)
{:ok, 15}
iex> tool = %Normandy.Tools.Examples.ListProcessor{operation: "average", numbers: [10, 20, 30]}
iex> Normandy.Tools.BaseTool.run(tool)
{:ok, 20.0}