Method: Code::Object::Dictionary#code_key
- Defined in:
- lib/code/object/dictionary.rb
#code_key(value, function = nil, **globals) ⇒ Object
421 422 423 424 425 426 427 428 429 430 |
# File 'lib/code/object/dictionary.rb', line 421 def code_key(value, function = nil, **globals) if function raw.key(value) || function.call(arguments: List.new([value, self]), **globals) else raw.key(value) || Nothing.new end rescue Error::Next => e e.value || Nothing.new end |