Class: Given
- Inherits:
-
BaseScopeFn
- Object
- Treetop::Runtime::SyntaxNode
- BaseScopeFn
- Given
- Defined in:
- lib/emerald/nodes/given.rb
Overview
Renders if a condition is met
Instance Method Summary collapse
Instance Method Details
#to_html(body, context) ⇒ Object
9 10 11 12 13 14 15 |
# File 'lib/emerald/nodes/given.rb', line 9 def to_html(body, context) if boolean_expr.truthy?(context) body.to_html(context) else '' end end |