Sha256: f15d9f790a7f0bf2c4eaeba2f6fe72ec723ad2489facb9f86735d9c55cfe597e
Contents?: true
Size: 507 Bytes
Versions: 29
Compression:
Stored size: 507 Bytes
Contents
# frozen_string_literal: true class Code class Node class Boolean < Node TRUE_KEYWORD = "true" FALSE_KEYWORD = "false" def initialize(parsed) return if parsed.blank? @boolean = parsed.presence end def evaluate(**_args) if @boolean == TRUE_KEYWORD Object::Boolean.new(true) elsif @boolean == FALSE_KEYWORD Object::Boolean.new(false) else Object::Nothing.new end end end end end
Version data entries
29 entries across 29 versions & 1 rubygems