Class: Formalist::ChildForms::Builder
- Inherits:
-
Object
- Object
- Formalist::ChildForms::Builder
- Defined in:
- lib/formalist/child_forms/builder.rb
Constant Summary collapse
- MissingFormDefinitionError =
Class.new(StandardError)
Instance Attribute Summary collapse
-
#embedded_forms ⇒ Object
readonly
Returns the value of attribute embedded_forms.
Instance Method Summary collapse
- #call(input) ⇒ Object (also: #[])
-
#initialize(embedded_form_collection) ⇒ Builder
constructor
A new instance of Builder.
Constructor Details
#initialize(embedded_form_collection) ⇒ Builder
Returns a new instance of Builder.
10 11 12 |
# File 'lib/formalist/child_forms/builder.rb', line 10 def initialize() @embedded_forms = end |
Instance Attribute Details
#embedded_forms ⇒ Object (readonly)
Returns the value of attribute embedded_forms.
7 8 9 |
# File 'lib/formalist/child_forms/builder.rb', line 7 def @embedded_forms end |
Instance Method Details
#call(input) ⇒ Object Also known as: []
14 15 16 17 |
# File 'lib/formalist/child_forms/builder.rb', line 14 def call(input) return input if input.nil? input.map { |node| visit(node) } end |