AttrEngine.Tree.AttributeSetTree (attr_engine v0.3.0)

Copy Markdown View Source

Closure table for AttributeSet DAG hierarchies.

Enables composition and inheritance between attribute sets:

  • includes — composition: child attributes are added to parent
  • extends — inheritance: child specialises parent
  • overrides — explicit override of specific attributes

Merge strategies

When attribute sets compose, handle collisions are resolved by:

  • parent_wins — parent's config takes precedence
  • child_wins — child's config takes precedence
  • merge — deep merge of configs

Override config

Allows fine-grained override of individual attribute handles:

%{"email" => %{"required" => true}, "phone" => %{"visible" => false}}

Summary

Functions

changeset(tree, attrs)