Sha256: 472fa50e895f9b564f01096b862c70ac9b758673497c5bf1a30ccebe7365c70a
Contents?: true
Size: 439 Bytes
Versions: 12
Compression:
Stored size: 439 Bytes
Contents
class Code class Node class Function < Node def initialize(function) @body = ::Code::Node::Code.new(function.fetch(:body)) @arguments = function.fetch(:arguments, []) @arguments.map! do |argument| ::Code::Node::FunctionArgument.new(argument) end end def evaluate(**args) ::Code::Object::Function.new(arguments: @arguments, body: @body) end end end end
Version data entries
12 entries across 12 versions & 2 rubygems