View Source Routex.ExtensionUtils (Phoenix Routes Extension Framework v0.2.0-alpha.7)
Provides utility funtions for extension development.
Link to this section Summary
Functions
Macro.escape/1
and IO.inspect/2
the given input. Options are
passed through to IO.inspect
. Returns the input.
Returns the ast to get the last value in the order list
Helper function to inspect AST as formatted code. Returns the input.
Link to this section Functions
Macro.escape/1
and IO.inspect/2
the given input. Options are
passed through to IO.inspect
. Returns the input.
@spec get_helper_ast(caller :: Macro.Env.t()) :: Macro.output()
Returns the ast to get the last value in the order list
Helper function to inspect AST as formatted code. Returns the input.
Example
iex> ast = quote do: Map.put(my_map, :key, value)
iex> inspect_ast(ast)
Map.put(my_map, :key, value)
...actual AST...