A new instance of Not.
Returns a new instance of Not.
6 7 8 9 10 11
# File 'lib/code/node/not.rb', line 6 def initialize(parsed) return if parsed.blank? @operator = parsed.delete(:operator).presence @right = Node::Statement.new(parsed.delete(:right).presence) end
13 14 15 16 17 18 19
# File 'lib/code/node/not.rb', line 13 def evaluate(**args) if @right @right.evaluate(**args).call(operator: @operator, **args) else Object::Nothing.new end end