Class: Ravensat::NilNode
Instance Attribute Summary
Attributes inherited from Node
Instance Method Summary collapse
- #&(object) ⇒ Object
-
#initialize ⇒ NilNode
constructor
A new instance of NilNode.
- #|(object) ⇒ Object
Methods inherited from Node
#clauses_size, #cnf?, #each, #each_by_descriptive, #eval, #to_dimacs, #to_s, #vars, #vars_size
Constructor Details
#initialize ⇒ NilNode
Returns a new instance of NilNode.
3 4 5 |
# File 'lib/ravensat/ast/nil_node.rb', line 3 def initialize @children = [] end |
Instance Method Details
#&(object) ⇒ Object
7 8 9 10 |
# File 'lib/ravensat/ast/nil_node.rb', line 7 def &(object) raise TypeError.new("#{object.class} can't be coerced into Ravensat::Node") unless object.is_a? Node object end |
#|(object) ⇒ Object
12 13 14 15 |
# File 'lib/ravensat/ast/nil_node.rb', line 12 def |(object) raise TypeError.new("#{object.class} can't be coerced into Ravensat::Node") unless object.is_a? Node object end |