_site/cover/pgec.COVER.html

1 %% Copyright (c) 2022 Peter Morgan <peter.james.morgan@gmail.com>
2 %%
3 %% Licensed under the Apache License, Version 2.0 (the "License");
4 %% you may not use this file except in compliance with the License.
5 %% You may obtain a copy of the License at
6 %%
7 %% http://www.apache.org/licenses/LICENSE-2.0
8 %%
9 %% Unless required by applicable law or agreed to in writing, software
10 %% distributed under the License is distributed on an "AS IS" BASIS,
11 %% WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12 %% See the License for the specific language governing permissions and
13 %% limitations under the License.
14
15
16 -module(pgec).
17
18
19 -export([get_env/1]).
20 -export([priv_consult/1]).
21 -export([priv_dir/0]).
22 -export([start/0]).
23 -export([version/0]).
24
25
26 version() ->
27 3 {ok, Version} = application:get_key(resp, vsn),
28 3 Version.
29
30
31 start() ->
32 8 application:ensure_all_started(?MODULE).
33
34
35 priv_dir() ->
36 8 code:priv_dir(?MODULE).
37
38
39 priv_consult(Filename) ->
40 8 phrase_file:consult(filename:join(priv_dir(), Filename)).
41
42
43 get_env(Par) ->
44
:-(
application:get_env(?MODULE, Par).
Line Hits Source