chore: apply credo suggestions (#3)
Some checks reported errors
continuous-integration/drone/push Build encountered an error
Some checks reported errors
continuous-integration/drone/push Build encountered an error
Mainly add module docs and fix some aliases.
This commit is contained in:
@@ -1,4 +1,8 @@
|
||||
defmodule Wabanex.IMC do
|
||||
@moduledoc """
|
||||
Body mass index calculation
|
||||
"""
|
||||
|
||||
def calculate(%{"filename" => filename}) do
|
||||
filename
|
||||
|> File.read()
|
||||
@@ -7,11 +11,7 @@ defmodule Wabanex.IMC do
|
||||
|
||||
defp handle_file({:ok, content}) do
|
||||
data =
|
||||
content
|
||||
|> String.trim()
|
||||
|> String.split("\n")
|
||||
|> Enum.map(&parse_line/1)
|
||||
|> Enum.into(%{})
|
||||
content |> String.trim() |> String.split("\n") |> Enum.map(&parse_line/1) |> Enum.into(%{})
|
||||
|
||||
{:ok, data}
|
||||
end
|
||||
|
Reference in New Issue
Block a user