lib/qrb/syntax/constraint_def.rb in qrb-0.2.0 vs lib/qrb/syntax/constraint_def.rb in qrb-0.3.0

- old
+ new

@@ -4,8 +4,14 @@ def compile(factory) constraints.compile(var_name.to_s) end + def to_ast + ast = constraints.to_ast(var_name.to_s) + ast = [ast] if ast.first.is_a?(Symbol) + ast + end + end # module ConstraintDef end # module Syntax end # module Qrb