Class: Formalist::ChildForms::ValidityCheck
- Inherits:
-
Object
- Object
- Formalist::ChildForms::ValidityCheck
- Defined in:
- lib/formalist/child_forms/validity_check.rb
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) ⇒ ValidityCheck
constructor
A new instance of ValidityCheck.
Constructor Details
#initialize(embedded_form_collection) ⇒ ValidityCheck
Returns a new instance of ValidityCheck.
9 10 11 |
# File 'lib/formalist/child_forms/validity_check.rb', line 9 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/validity_check.rb', line 7 def @embedded_forms end |
Instance Method Details
#call(input) ⇒ Object Also known as: []
13 14 15 16 |
# File 'lib/formalist/child_forms/validity_check.rb', line 13 def call(input) return input if input.nil? input.map { |node| valid?(node) }.all? end |