We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 09574b2 commit 7f33e44Copy full SHA for 7f33e44
lib/main.ex
@@ -12,12 +12,7 @@ defmodule InterpolationApp.Main do
12
System.halt()
13
end
14
15
- argv =
16
- Enum.map(args, fn arg -> String.split(arg, "--") end)
17
- |> List.flatten()
18
- |> Enum.filter(fn s -> s != "" end)
19
-
20
- case ConfigParser.parse_args(argv) do
+ case ConfigParser.parse_args(extract_args(args)) do
21
{:ok, config} ->
22
Repl.start(config)
23
@@ -28,6 +23,13 @@ defmodule InterpolationApp.Main do
28
29
24
30
25
26
+ defp extract_args(args) do
27
+ args
+ |> Enum.map(fn arg -> String.split(arg, "--") end)
+ |> List.flatten()
+ |> Enum.filter(fn s -> s != "" end)
31
+ end
32
+
33
defp help do
34
"""
35
usage: interpolation-app [options] --methods=<method1,method2,...> --step=<step>
0 commit comments