module Hathor::NestedMacro
Direct including types
Defined in:
macros/nested.crMacro Summary
-
nested(nested_name, **options)
nested macro To achieve nesting like contract.address.street, we think about the nested element as a new nested contract.
-
nested!(name, **options)
shortcut for "nilable: false" option
Macro Detail
macro nested(nested_name, **options)
#
nested macro To achieve nesting like contract.address.street, we think about the nested element as a new nested contract.
- populates the PROPERTIES hash to a nested element
- defines @type.id::nested_name < Contract class with yield
- depending on nilable option
- casts property name : @type.id::nested_name | Nil
- defines [email protected]::nested_name method
- casts property name : @type.id::nested_name
- casts property name : @type.id::nested_name | Nil