diff options
Diffstat (limited to 'src/rcl_provider.erl')
-rw-r--r-- | src/rcl_provider.erl | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/src/rcl_provider.erl b/src/rcl_provider.erl index 9d1dd88..c3ef434 100644 --- a/src/rcl_provider.erl +++ b/src/rcl_provider.erl @@ -10,6 +10,7 @@ %% API -export([new/2, do/2, + impl/1, format_error/1, format_error/2, format/1]). @@ -57,6 +58,12 @@ new(ModuleName, State0) when is_atom(ModuleName) -> do({?MODULE, Mod}, State) -> Mod:do(State). +%%% @doc get the name of the module that implements the provider +%%% @param Provider the provider object +-spec impl(Provider::t()) -> module(). +impl({?MODULE, Mod}) -> + Mod. + %% @doc format an error produced from a provider. -spec format_error(Reason::term()) -> iolist(). format_error({non_existing, ModuleName}) -> |