Data retrieval: a user obtains structured data from a database management system by making a query into a database. An information retrieval query language involves weighted terms, ranking, relevance, etc. Additional Ruby methods might insert, update or delete data. To customize data per user. So each user could conceivably receive a slightly different web page. Or slightly varied content per visit. Or per various queries during the same visit.
Ruby assembles the hypertext markup, stylesheets and JavaScript syntax of a dynamic web page--while in progress--from component files or database data.