Class: Ravensat::VarNode

Inherits:
Node
  • Object
show all
Defined in:
lib/ravensat/ast/var_node.rb

Instance Attribute Summary collapse

Attributes inherited from Node

#children

Instance Method Summary collapse

Methods inherited from Node

#&, #clauses_size, #each, #to_s, #vars, #vars_size, #|

Constructor Details

#initializeVarNode

Returns a new instance of VarNode.



4
5
6
7
# File 'lib/ravensat/ast/var_node.rb', line 4

def initialize
  @value
  @children = []
end

Instance Attribute Details

#valueObject

Returns the value of attribute value.



3
4
5
# File 'lib/ravensat/ast/var_node.rb', line 3

def value
  @value
end

Instance Method Details

#cnf?Boolean

Returns:

  • (Boolean)


13
14
15
# File 'lib/ravensat/ast/var_node.rb', line 13

def cnf?
  true
end

#resultObject



17
18
19
# File 'lib/ravensat/ast/var_node.rb', line 17

def result
  @value
end

#~@Object



9
10
11
# File 'lib/ravensat/ast/var_node.rb', line 9

def ~@
  NotNode.new(self)
end