Add object id lookup

This commit is contained in:
Carlos Martín Nieto
2013-03-02 03:27:40 +01:00
parent d62511515d
commit 9b2a053848
7 changed files with 48 additions and 4 deletions

View File

@@ -4,7 +4,7 @@
-include_lib("eunit/include/eunit.hrl").
-endif.
-export([bypath/2]).
-export([bypath/2, id/1]).
-include("geef_records.hrl").
@@ -16,6 +16,9 @@ bypath(#object{type=tree,handle=Handle}, Path) ->
Other
end.
id(Obj = #object{type=tree}) ->
geef_object:id(Obj).
-ifdef(TEST).
%% This is somewhat hacky, assuming that this is running under .eunit,