Event - Event with Let Scoping
Setup
defmodule Foo do
use(Mazurka.Resource)
let(foo = 123)
mediatype(Hyper) do
action() do
%{"hello" => "world"}
end
end
event() do
conn = Map.put(conn, :hello, foo + foo)
end
end
action
{_, _, conn} = Foo.action([], %{}, %{}, %{})
conn[:hello] == 246