Class: Udb::Eqn::EqnOr

Inherits:
Treetop::Runtime::SyntaxNode
  • Object
show all
Extended by:
T::Sig
Defined in:
lib/udb/eqn.rb

Instance Method Summary collapse

Instance Method Details

#to_logic_tree(term_map) ⇒ LogicNode

Parameters:

Returns:



159
160
161
162
163
164
165
166
# File 'lib/udb/eqn.rb', line 159

def to_logic_tree(term_map)
  children = T.let([], T::Array[LogicNode])
  children << send(:first).to_logic_tree(term_map)
  send(:r).elements.each do |e|
    children << e.conjunction.to_logic_tree(term_map)
  end
  LogicNode.new(LogicNodeType::Or, children)
end