It is believed that he was a general in Joshua army. If you investigate in Matthew and trace back it will lead you around but keep studing it because it is not plainly written.
Obed.At Matthew 1:5-6 we are told that"Salmon became father to Boaz by Rahab;Boaz became father to Obed by Ruth;Obed became father to Jesse;Jesse became father to David the king.. "
Nahshon Rth 4:20-22 Amminadab begot Nahshon, and Nahshon begot Salmon; Salmon begot Boaz, and Boaz begot Obed; Obed begot Jesse, and Jesse begot David.
Nahshon. David's family ancestry is defined in Matthew 1:1-6. Matthew 1:4c-6 "Nahshon the father of Salmon, Salmon the father of Boaz, Boaz the father of Obed, Obed the father of Jesse, and Jesse the father of King David."
Matthew 1:5 - "Salmon the father of Boaz, whose mother was Rahab, Boaz the father of Obed, whose mother was Ruth, Obed the father of Jesse"
Salmon and Rahab(mother) was his parents
Nahshon Rth 4:20-22 Amminadab begot Nahshon, and Nahshon begot Salmon; Salmon begot Boaz, and Boaz begot Obed; Obed begot Jesse, and Jesse begot David.
The Bible does not specify but it states that he was of the family of Elimelech, who was the deceased husband of Naomi, Ruths' mother in law.
Solomon was the son of David; David the son of Jesse; Jesse the son of Obed; Obed the son of Boaz; Boaz the son of Salmon; Salmon the son of Nahshon; Nahshon the son of Amminidab; Amminidab the son of Ram; Ram the son of Hezron; Hezron the son of Perez; Perez the son of Judah; Judah the son of Jacob; Jacob the son of Isaac; and Isaac the son of Abraham.
Salmon/Salma
Boaz .
Boaz and Ruth's son was Obed, father of Jesse, and grandfather of David. Boaz is mentiond in both the Gospel of Matthew and the Gospel of Luke as an ancestor of Jesus
No Ruth was the great, great grandmother of king David.