Sha256: 8166103d3d2b78358f9401b773c7efa64e34aef40b08b7b86cf4c12eb3149ece
Contents?: true
Size: 454 Bytes
Versions: 29
Compression:
Stored size: 454 Bytes
Contents
# frozen_string_literal: true class Code class Node class Function < Node def initialize(parsed) return if parsed.blank? @parameters = parsed.delete(:parameters).presence || [] @parameters.map! { |parameter| FunctionParameter.new(parameter) } @body = Code.new(parsed.delete(:body).presence) end def evaluate(**_args) Object::Function.new(@parameters, @body) end end end end
Version data entries
29 entries across 29 versions & 1 rubygems