Skip to content

Commit

Permalink
Add finsup template for isolated supervisor
Browse files Browse the repository at this point in the history
In cases where a supervisor is needed separate from a top-level
application supervisor, the finsup template should be used.
  • Loading branch information
mbbx6spp committed Feb 15, 2011
1 parent 6c622c0 commit 27fb5b1
Show file tree
Hide file tree
Showing 2 changed files with 34 additions and 0 deletions.
25 changes: 25 additions & 0 deletions finsup.erl
@@ -0,0 +1,25 @@
%%%' HEADER
%%% @author {{author_name}} <{{author_email}}>
%%% @since {{date}}
%%% @copyright {{copyright_year}} {{author_name}}
%%% @doc {{description}}
%%% @end
-module({{name}}_sup).

-behaviour(supervisor).
-export([start_link/0]).
-export([init/1]).

-define(SERVER, ?MODULE).
%%%.
%%%' PUBLIC API
start_link() ->
supervisor:start_link({local, ?SERVER}, ?MODULE, []).

%%%.
%%%' CALLBACKS
init([]) ->
{ok, { {one_for_one, 5, 10}, []} }.

%%%.
%%% vim: set filetype=erlang tabstop=2 foldmarker=%%%',%%%. foldmethod=marker:
9 changes: 9 additions & 0 deletions finsup.template
@@ -0,0 +1,9 @@
{variables, [
{name, "supname"},
{app_dir, "."},
{copyright_year, "2011"},
{author_name, "Susan Potter"},
{author_email,"me@susanpotter.net"}
]}.
{dir, "{{app_dir}}/src"}.
{template, "finsup.erl", "{{app_dir}}/src/{{name}}_sup.erl"}.

0 comments on commit 27fb5b1

Please sign in to comment.