Sha256: 648fa15843d6106a57eac3d080dfc7344e1e1741b7c16d60efb5baebd78febb4
Contents?: true
Size: 494 Bytes
Versions: 29
Compression:
Stored size: 494 Bytes
Contents
# frozen_string_literal: true class Code class Node class Code < Node def initialize(parsed) return if parsed.blank? @statements = (parsed.presence || []).map { |statement| Statement.new(statement) } end def evaluate(**args) last = Object::Nothing.new (@statements || []).each do |statement| last = statement.evaluate(**args.merge(object: Object::Global.new)) end last end end end end
Version data entries
29 entries across 29 versions & 1 rubygems