# File lib/brakeman/checks/check_sql.rb, line 114
  def process_scope_with_block model_name, args
    scope_name = args[1][1]
    block = args[-1][-1]

    # Search lambda for calls to query methods
    if block.node_type == :block
      find_calls = Brakeman::FindAllCalls.new(tracker)
      find_calls.process_source(block, :class => model_name, :method => scope_name)
      find_calls.calls.each { |call| process_result(call) if @sql_targets.include?(call[:method]) }
    elsif call? block
      while call? block
        process_result :target => block.target, :method => block.method, :call => block,
         :location => { :type => :class, :class => model_name, :method => scope_name }

        block = block.target
      end
    end
  end