Class: Idl::ConstraintBodyAst

Inherits:
AstNode
  • Object
show all
Defined in:
lib/udb/idl/condition_to_udb.rb

Instance Method Summary collapse

Instance Method Details

#to_udb_h(symtab) ⇒ UdbHashType

Parameters:

  • symtab (Idl::SymbolTable)

Returns:



53
54
55
56
57
58
59
60
61
# File 'lib/udb/idl/condition_to_udb.rb', line 53

def to_udb_h(symtab)
  if @children.size == 1
    @children.fetch(0).to_udb_h(symtab)
  else
    {
      "allOf" => @children.map { |child| child.to_udb_h(symtab) }
    }
  end
end