move handling of anonymous handlers to gen_json
This commit is contained in:
parent
29175a7845
commit
e145220d92
2 changed files with 13 additions and 9 deletions
|
@ -26,7 +26,6 @@
|
|||
-export([parse_opts/1, extract_opts/1]).
|
||||
-export([nice_decimal/1]).
|
||||
-export([json_escape/2]).
|
||||
-export([handle_event/2, init/1]).
|
||||
|
||||
-include("../include/jsx_opts.hrl").
|
||||
|
||||
|
@ -267,12 +266,6 @@ to_hex(X) -> X + 48. %% ascii "1" is [49], "2" is [50], etc...
|
|||
|
||||
|
||||
|
||||
handle_event(Event, {F, undefined}) -> F(Event), {F, undefined};
|
||||
handle_event(Event, {F, State}) -> {F, F(Event, State)}.
|
||||
|
||||
init(State) -> State.
|
||||
|
||||
|
||||
%% eunit tests
|
||||
-ifdef(TEST).
|
||||
-include_lib("eunit/include/eunit.hrl").
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue