Current section

Files

Jump to
excellent_migrations lib message_generator.ex
Raw

lib/message_generator.ex

defmodule ExcellentMigrations.MessageGenerator do
@moduledoc false
def build_message(%{type: type, path: path, line: line}) do
"#{build_message(type)} in #{path}:#{line}"
end
def build_message(type) do
type
|> Atom.to_string()
|> String.replace("_", " ")
|> String.capitalize()
end
end