anka v0.1.0 Anka.Model behaviour View Source
Link to this section Summary
Functions
Generates an Anka.Model from keywords
Link to this section Functions
Generates an Anka.Model from keywords.
Examples
iex> defmodule Post do
...>
...> use Anka.Model, [
...> meta: [
...> singular: :post,
...> plural: :posts,
...> ],
...> struct: [
...> fields: [
...> title: [
...> type: :string,
...> ],
...> body: [
...> type: :string,
...> ],
...> ],
...> ],
...> ]
...>
...> end
...>
...> Anka.Model.Interpreter.get_opt(Post, :"struct.fields.title.type")
:string