Class: Fabulator::Expr::EveryExpr
- Inherits:
-
ForExpr
- Object
- ForExpr
- Fabulator::Expr::EveryExpr
show all
- Defined in:
- lib/fabulator/expr/for_expr.rb
Instance Method Summary
collapse
Methods inherited from ForExpr
#initialize
Instance Method Details
#expr_type(context) ⇒ Object
33
34
35
|
# File 'lib/fabulator/expr/for_expr.rb', line 33
def expr_type(context)
[ FAB_NS, 'boolean' ]
end
|
#run(context, autovivify = false) ⇒ Object
37
38
39
40
41
42
43
|
# File 'lib/fabulator/expr/for_expr.rb', line 37
def run(context, autovivify = false)
result = super
result.each do |r|
return [ context.root.anon_node(false) ] unless !!r.value
end
return [ context.root.anon_node(true) ]
end
|