Isn't `has_body = part.length > 0` enough in here? `||=` seems unnecessary as `has_body` will always be false.