Method: Code::Node::Dictionary::KeyValue#evaluate

Defined in:
lib/code/node/dictionary.rb

#evaluate(**args) ⇒ Object



21
22
23
24
25
26
27
28
29
30
# File 'lib/code/node/dictionary.rb', line 21

def evaluate(**args)
  key = @key&.evaluate(**args) || Object::Nothing.new

  if @value
    value = @value.evaluate(**args)
    [key, value]
  else
    [key, key]
  end
end