Write a few docs

This commit is contained in:
Carlos Martín Nieto
2013-03-31 23:17:51 +02:00
parent 2dcd701c53
commit c2d1acbbe6
3 changed files with 17 additions and 2 deletions

View File

@@ -1,3 +1,4 @@
%%% @doc Dealing with object names
-module(geef_oid).
-ifdef(TEST).
@@ -8,12 +9,13 @@
-export([parse/1, fmt/1]).
%% @doc Get the hex-encoded hash
-spec fmt(oid()) -> binary().
fmt(#oid{oid=Oid}) ->
geef:oid_fmt(Oid).
-spec parse(binary()) -> oid().
%% @doc Parse an iolist as a hash
-spec parse(iolist()) -> oid().
parse(Sha) ->
Oid = geef:oid_parse(Sha),
#oid{oid=Oid}.