The Rubai that is also known as Rubaiyat in western literature is an Urdu-Persian poetic form. Each Rubai stanza is supposed to be a quatrain, in which lines 1, 2 and 4 all rhyme. Therefore the rhyme sounds as AABA. The general pattern of Rubai is such that the poet uses metaphor and similes in first 3 lines but has to all of a sudden conclude the meaning in the fourth one. This form is very tough to write and thus preferred by experienced poets. The Rubai is a good form to use when you've got something to say; the constraints of the form are not severe enough to prevent you from saying it.
There is a variation of Rubaiyat known as interlocking Rubaiyat. In this
type of Rubai, the third line of each stanza rhymes with lines 1, 2 and
4 of the next. Traditionally in Persia each Rubai was regarded as a poem
in its own right. When a collection of them called Rubaiyat was
published, they were arranged in a fixed order viz. in alphabetical
order of the last letter of the rhyme.
The Rubaiyat of Omar Khayyam is the best example of Rubai form. It is
actually a meditation on the meaning of life that concludes that we
should eat, drink and be merry. Omar Khayyam lived in twelfth-century
Persia, under Islamic law. The ideas in his Rubaiyat as well as his
enthusiasm for wine were considered heretical. Therefore Rubaiyat were
circulated anonymously, and probably memorized a lot more often than
they were written down.
The Rubai form is much more lax than traditional forms of Arabic and
Persian poetry, which would use a single rhyme all the way through the
poem, however long.