Sha256: 16f9f1bd728c0e2a8763bb838aa7b493fade9b98c632b5954f3912cc0f9ff26e
Contents?: true
Size: 691 Bytes
Versions: 29
Compression:
Stored size: 691 Bytes
Contents
# frozen_string_literal: true class Code class Node class CallArgument < Node def initialize(parsed) return if parsed.blank? @value = Node::Code.new(parsed.delete(:value).presence) @name = parsed.delete(:name).presence end def evaluate(**args) if @name Object::Dictionary.new( name => @value&.evaluate(**args) || Object::Nothing.new ) else @value&.evaluate(**args) || Object::Nothing.new end end def keyword? !!@name end def regular? !keyword? end def name Object::String.new(@name) end end end end
Version data entries
29 entries across 29 versions & 1 rubygems