Class: Unless
- Inherits:
-
BaseScopeFn
- Object
- Treetop::Runtime::SyntaxNode
- BaseScopeFn
- Unless
- Defined in:
- lib/emerald/nodes/unless.rb
Overview
Renders unless 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/unless.rb', line 9 def to_html(body, context) if boolean_expr.truthy?(context) '' else body.to_html(context) end end |