ratchet v0.2.1 Ratchet.EEx

Summary

Functions

Build an EEx statement fetching attributes

Spit out an EEx ending

Build an EEx list comprehension from a scope and a property

Build an EEx statement fetching content

Functions

eex_attributes(property, attributes)

Build an EEx statement fetching attributes

iex> Ratchet.EEx.eex_attributes("lolwat", [])
"<%= Ratchet.Data.attributes(lolwat, []) %>"
eex_close()

Spit out an EEx ending

eex_comprehension_open(scope, property)

Build an EEx list comprehension from a scope and a property

iex> Ratchet.EEx.eex_comprehension_open("foo", "bar")
"<%= for bar <- List.wrap(foo.bar) do %>"
eex_content(property)

Build an EEx statement fetching content

iex> Ratchet.EEx.eex_content("lolwat")
"<%= Ratchet.Data.content(lolwat) %>"