Created
October 23, 2013 12:39
-
-
Save 5HT/7117914 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
defmodule N2O do | |
defmacro element_base(mod) do quote do [ancestor: :element, module: unquote(mod), id: :undefined, | |
actions: [], class: [], style: [], source: [], | |
data_fields: [], aria_states: [], body: [], role: [], | |
tabindex: 0, show_if: false, html_tag: :undefined, title: []] end end | |
defrecord :dtl, N2O.element_base(:element_dtl) ++ [file: "index", bindings: [], app: __DIR__, folder: "priv/templates", ext: "html", bind_script: true] | |
defrecord :context, Record.extract(:context, from_lib: "n2o/include/wf.hrl") | |
defrecord :button, Record.extract(:button, from_lib: "n2o/include/wf.hrl") | |
defrecord :http_req, Record.extract(:http_req, from_lib: "cowboy/src/cowboy_req.erl") | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment