Browse files

Fixed typos in readme, added register/5 and /4.

  • Loading branch information...
1 parent a2cd0ef commit e46d372b47f2c6d8d594e4f1f90f553154752cee @Licenser committed Mar 17, 2013
Showing with 9 additions and 3 deletions.
  1. +3 −3 README.md
  2. +6 −0 src/eplugin.erl
View
6 README.md
@@ -1,11 +1,11 @@
eplugin
========
-This library intends to provide a simple way to manage plugins for an erlang application, right now the abstraction is very simple and high level but it is quite flexible.
+This library intends to provide a simple way to manage plugins for an Erlang application, right now the abstraction is very simple and high level but it is quite flexible.
usage
-----
-Simply start the applicaiton, there is only one configuration variable at the moment named `plugin_dir` which as the name suggets specifies where the plugins are discovered. It defaults to `plugsin`.
+Simply start the application, there is only one configuration variable at the moment named `plugin_dir` which as the name suggests specifies where the plugins are discovered. It defaults to `plugsin`.
apply/2
-------
@@ -110,7 +110,7 @@ Callbacks
notation
--------
-callbacks are noted as `<callback name>(arguments)` so `eplugin:init(Config)` means the callback `eplugin:init` is caled with 1 argument - `Config`.
+callbacks are noted as `<callback name>(arguments)` so `eplugin:init(Config)` means the callback `eplugin:init` is called with 1 argument - `Config`.
internal callbacks
------------------
View
6 src/eplugin.erl
@@ -6,6 +6,7 @@
call/1, call/2, call/3, call/4,
apply_test/2,
test/1, test/2, test/3, test/4,
+ register/4, register/5,
fold/2,
config/1,
plugins/0,
@@ -163,6 +164,11 @@ enable(Plugin) ->
end
end.
+register(Name, Callback, Module, Function) ->
+ register(Name, Callback, Module, Function, []).
+
+register(Name, Callback, Module, Function, Options) ->
+ eplugin_srv:register_callback(Name, Callback, Module, Function, Options).
is_enabled(Plugin) ->
case ets:match(?TABLE, {'_', Plugin, '_', '_'}) of

0 comments on commit e46d372

Please sign in to comment.