Turning a gameobject around 180 degress

function Update() {

if (!moving && !park)
{
    if (!turnAround)
    {
        ///move staight on if no arrays
        transform.Translate(Vector3.forward * Time.deltaTime* speed);
    }
    else
    {
        var targetRotation = Quaternion.Euler(Vector3.Reflect(transform.position, Vector3.forward));
        transform.rotation = Quaternion.Slerp( transform.rotation, targetRotation, Time.deltaTime * turnSpeed );
        if (transform.rotation.y == -1)
        {
            turnAround = false;
        }
    }

}

}

Here is my code i am having problems turning the transform around a 180 degress then making turnAround = false to stop the rotate. It will be like when you hit a ball onto a wall at different angles the truck will turn then follow the forward motion the same.

Thanks

thanks i sorted it by doing

function RotateObject (thisTransform : Transform, degrees : Vector3, seconds : float) {

if (rotating) return;
rotating = true;

var startRotation = thisTransform.rotation;
var endRotation = thisTransform.rotation * Quaternion.Euler(degrees);
var t = 0.0;
var rate = 1.0/seconds;
while (t < 1.0) {
    t += Time.deltaTime * rate;
    thisTransform.rotation = Quaternion.Slerp(startRotation, endRotation, t);
    yield;
}

rotating = false;
}