Class: Formalist::Form
- Inherits:
-
Object
- Object
- Formalist::Form
- Extended by:
- Dry::Configurable
- Defined in:
- lib/formalist/form.rb,
lib/formalist/form/result.rb,
lib/formalist/form/definition_context.rb
Defined Under Namespace
Classes: DefinitionContext, Result
Class Method Summary collapse
Instance Method Summary collapse
Class Method Details
.define(&block) ⇒ Object
19 20 21 22 23 24 |
# File 'lib/formalist/form.rb', line 19 def self.define(&block) @elements = DefinitionContext.new( container: config.elements_container, permissions: Element::PermittedChildren.all ).call(&block).elements end |
.elements ⇒ Object
This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.
14 15 16 |
# File 'lib/formalist/form.rb', line 14 def self.elements @elements ||= [] end |