File tree Expand file tree Collapse file tree 2 files changed +11
-1
lines changed
Expand file tree Collapse file tree 2 files changed +11
-1
lines changed Original file line number Diff line number Diff line change 11## Changelog
22
3+ ## v2.1.9
4+
5+ * Enhancements
6+ * Add ` only ` option to ` include `
7+
38## v2.1.8
49
510* Enhancements
Original file line number Diff line number Diff line change @@ -110,8 +110,13 @@ defmodule Construct do
110110 @ doc """
111111 Includes provided structure and checks definition for validity at compile-time.
112112
113+ ## Options
114+
115+ * `:only` - (integer) specify fields that should be taken from included module,
116+ throws an error when field doesn't exist in provided module.
117+
113118 If included structure is invalid for some reason — this macro throws an
114- `Struct .DefinitionError` exception with detailed reason.
119+ `Construct .DefinitionError` exception with detailed reason.
115120 """
116121 @ spec include ( t , keyword ) :: Macro . t ( )
117122 defmacro include ( struct , opts \\ [ ] ) do
You can’t perform that action at this time.
0 commit comments