Sha256: f0a9dad7eb7ee47d6142e20ea4c49580b2be5c24d15e1fdaa49914f164bc08f9
Contents?: true
Size: 473 Bytes
Versions: 29
Compression:
Stored size: 473 Bytes
Contents
# frozen_string_literal: true class Code class Node class Negation < Node def initialize(parsed) return if parsed.blank? @operator = parsed.delete(:operator).presence @right = Node::Statement.new(parsed.delete(:right).presence) end def evaluate(**args) if @right @right.evaluate(**args).call(operator: @operator, **args) else Object::Nothing.new end end end end end
Version data entries
29 entries across 29 versions & 1 rubygems