Files
elixir-koans/lib/display/intro.ex
Ahmed Ismail edf50fdf80 Add credo to the project and:
- Run mix credo --all to identify possible code optimizations
 - Resolve most of the errors generated by credo such as:
   - Numbers larger than 9999 should be written with underscores: 58_127
   - Modules should have a @moduledoc tag
   - Comparison will always return true
2023-11-10 00:57:21 +05:00

18 lines
275 B
Elixir

defmodule Display.Intro do
@moduledoc false
alias Display.Paint
def intro(module, modules) do
if module in modules do
""
else
show_intro(module.intro)
end
end
def show_intro(message) do
(message <> "\n")
|> Paint.green()
end
end