Diesel.Tag (diesel v0.7.2)

Tags are the building blocks for the syntax offered by a Diesel DSL.

Usage:

defmodule MyApp.Fsm.Dsl.State do
  use Diesel.Tag

  attribute :name, kind: :atom
  child :on, :min: 0
end

For more information on how to define structured tags, please check the examples provided in the documentation and in tests

Summary

Functions

Returns the name of the given tag

Returns whether a tag is structured or not

Validates the given definition node against the given tag

Functions

Returns the name of the given tag

For unstructured, plain atom tags, the name is simply the atom itself

Link to this function

structured?(tag)

Returns whether a tag is structured or not

Link to this function

validate(tag, node)

Validates the given definition node against the given tag

This function supports both structured and plain atom tags.

For plain atom tags, this function will always return success.