Extracts modules for different sections of the UI

This commit is contained in:
Felipe Sere
2016-05-13 11:03:53 +01:00
parent 8a8a0be771
commit af543d1b62
8 changed files with 141 additions and 4 deletions

15
lib/display/intro.ex Normal file
View File

@@ -0,0 +1,15 @@
defmodule Display.Intro do
def intro(module, modules) do
if not module in modules do
show_intro(module.intro)
else
""
end
end
def show_intro(""), do: nil
def show_intro(message) do
message <> "\n"
|> Colours.green
end
end