Class: Formalist::RichText::ValidityCheck
- Inherits:
-
Object
- Object
- Formalist::RichText::ValidityCheck
- Defined in:
- lib/formalist/rich_text/validity_check.rb
Defined Under Namespace
Classes: AST
Instance Method Summary collapse
- #call(ast) ⇒ Object (also: #[])
Instance Method Details
#call(ast) ⇒ Object Also known as: []
8 9 10 11 12 13 |
# File 'lib/formalist/rich_text/validity_check.rb', line 8 def call(ast) forms = ast.map { |node| visit(node) }.flatten form_validity_check = Form::ValidityCheck.new forms.all? { |form_ast| form_validity_check.(form_ast.ast) } end |