Last active
February 27, 2017 11:04
-
-
Save blackode/8370b85db75ec4cbdb42a52c269a4128 to your computer and use it in GitHub Desktop.
task with short docs
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
defmodule Mix.Tasks.MyTasks.Functions do | |
use Mix.Task | |
@shortdoc "Returns functions in Module" | |
@moduledoc ~S""" | |
This is used to list out the all available functions in the module. | |
You suppose to pass module_name as parameter to the task. | |
#Usage | |
``` | |
mix my_tasks.functins Hello | |
``` | |
This list out all the functins in the module Hello | |
""" | |
def run([module_name]) do | |
module = Module.concat Elixir,module_name | |
data = apply(module, :__info__, [:functions]) | |
IO.inspect data | |
end | |
end | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment