Dynamic assignment - a Ruby question



Coming from a Hibernate background, and just starting out learning both
Ruby and Rails, I found this blog post interested me (it details useful
functionality not currently in ActiveRecord but present in Hibernate):


My question is at the bottom of the page:

Iâ??m totally new to ruby. I have this working, but have a question. Can I
dynamically add the parameters I want to query on? Say I have a search
form, with 5 text fields each bound to a different member variable of
the same 1 class. I want to search on each field only if some text is
entered into that fieldâ?¦How would I do it?

Is this possible?