CommonX v0.2.3 ApplicationX View Source
Application module extended functions.
Link to this section Summary
Functions
List all available applications excluding system ones.
List all dependant applications excluding system ones. Does includes the given application.
List all available modules excluding system ones.
List all available modules for the given app[s] and dependencies of those apps. This excludes system modules.
Link to this section Functions
applications()
View Source
applications() :: [atom()]
applications() :: [atom()]
List all available applications excluding system ones.
This function is save to run in Mix.Task
s.
Example
Since :common_x
does not have any dependencies:
iex> ApplicationX.applications
[:common_x]
applications(app) View Source
List all dependant applications excluding system ones. Does includes the given application.
This function is save to run in Mix.Task
s.
Example
Since :common_x
does not have any dependencies:
iex> ApplicationX.applications(:common_x)
[:common_x]
Duplicates are ignored and only returned once:
iex> ApplicationX.applications([:common_x, :common_x])
[:common_x]
Unknown applications are safe, but returned:
iex> ApplicationX.applications(:fake)
[:fake]
modules()
View Source
modules() :: [module()]
modules() :: [module()]
List all available modules excluding system ones.
This function is save to run in Mix.Task
s.
Example
Since :common_x
does not have any dependencies:
iex> ApplicationX.modules
[ApplicationX, CommonX, EnumX, MacroX, MapX]
modules(app) View Source
List all available modules for the given app[s] and dependencies of those apps. This excludes system modules.
This function is save to run in Mix.Task
s.
Example
Normally system modules are excluded, but can be added by manually passing the respective system application:
iex> ApplicationX.modules(:logger)
[Logger, Logger.App, Logger.BackendSupervisor, Logger.Backends.Console,
Logger.Config, Logger.ErlangHandler, Logger.ErrorHandler, Logger.Formatter,
Logger.Translator, Logger.Utils, Logger.Watcher]
Duplicate applications are ignored:
iex> ApplicationX.modules([:logger, :logger])
[Logger, Logger.App, Logger.BackendSupervisor, Logger.Backends.Console,
Logger.Config, Logger.ErlangHandler, Logger.ErrorHandler, Logger.Formatter,
Logger.Translator, Logger.Utils, Logger.Watcher]
Unknown applications are safe to pass:
iex> ApplicationX.modules(:fake)
[]