How is the prohibition of Moabites from the Assembly harmonized with David's lineage?
How does the restriction in Deuteronomy 23:3 not apply to King David?

Is it because Ruth was female, and heritage was passed down through the male gender?
Is it because Ruth denounced her own people, and bound herself to Isreal through Naomi?
Is it because Ruth married an Isrealite that her descendants do not come under this restriction?

Deuteronomy 23:3