Skip to content

Commit

Permalink
say/2 now uses the event api
Browse files Browse the repository at this point in the history
  • Loading branch information
GwendalLaurent committed May 3, 2024
1 parent 387713a commit f993fa0
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/grisp_tools_io.erl
Original file line number Diff line number Diff line change
Expand Up @@ -88,7 +88,8 @@ trim(Str, Dir, [Chars|_]) -> string:strip(rebar_utils:to_list(Str), Dir, Chars).
-endif.

say(State, Say) ->
io:format(lists:flatten([Say, "~n"])).
Event = {say, io_lib:format(lists:flatten([Say, "~n"]), [])},
grisp_tools_util:event(State, Event).

-spec say(string(), [term()] | term()) -> ok.
say(State, Say, Args) when is_list(Args) ->
Expand Down

0 comments on commit f993fa0

Please sign in to comment.