Method: Code::Object::List#code_detect

Defined in:
lib/code/object/list.rb

#code_detect(argument, **globals) ⇒ Object



98
99
100
101
102
# File 'lib/code/object/list.rb', line 98

def code_detect(argument, **globals)
  raw.detect do |element|
    argument.call(arguments: [Argument.new(element)], **globals).truthy?
  end || Nothing.new
end