ratchet v0.3.0 Ratchet.Transformer

Transforms Ratchet into EEx

Summary

Functions

Get the "type" of a node. First property is returned

Build EEx statements from Ratchet AST

Functions

get_prop(arg)

Get the "type" of a node. First property is returned.

iex> Transformer.get_prop({"div", [{"data-prop", "bar"}], []})
"bar"
iex> Transformer.get_prop({"div", [], []})
:none
transform(text, scope \\ "data")

Build EEx statements from Ratchet AST