Class: IfProcessor
- Inherits:
-
Object
- Object
- IfProcessor
- Includes:
- Thymeleaf::Processor
- Defined in:
- lib/thymeleaf/dialects/default/processors/if.rb
Instance Method Summary collapse
Methods included from Thymeleaf::Processor
#evaluate_in_context, #load_template, #subprocess_node
Instance Method Details
#call(node: nil, attribute: nil, context: nil, **_) ⇒ Object
7 8 9 10 11 12 13 |
# File 'lib/thymeleaf/dialects/default/processors/if.rb', line 7 def call(node:nil, attribute:nil, context:nil, **_) attribute.unlink unless booleanize EvalExpression.parse(context, attribute.value) node.children.each {|child| child.unlink } node.unlink end end |