ratchet v0.0.4 Ratchet.Transformer
Summary
Functions
Get the "type" of a node. First property or scope is returned
Build EEx statements from Ratchet AST
Functions
Get the "type" of a node. First property or scope is returned.
iex> Transformer.get_type({"div", [{"data-scope", "foo"}], []})
{:scope, "foo"}
iex> Transformer.get_type({"div", [{"data-prop", "bar"}], []})
{:property, "bar"}
iex> Transformer.get_type({"div", [{"data-scope", "foo"}, {"data-prop", "bar"}], []})
{:scope, "foo"}
iex> Transformer.get_type({"div", [], []})
:none