Looking through my blog DB, most of the Ruby code is pretty small and single-purpose (I blame XPages for requiring very little non-declarative code in a lot of cases). I should probably come up with an overall "Why Would I Do This?" document explaining how Ruby differs from Java, JavaScript, and LotusScript, with some larger examples of Domino-specific code.
I'll see what I can do about a proper example. In the mean time, this snippet, which pulls in the archive's months from a view and converts them to Java dates, at least uses the #collect method, which is like @Transform(), as well as JRuby's translation of camelCase to underscore_separated names to match the overall Ruby style:
<xp:dataContext var="archiveMonths">
<xp:this.value><![CDATA[${ruby:
posts = database.get_view("Posts by Month")
months = posts.get_column_values(0)
posts.recycle
months.collect { |dateTime| d = dateTime.to_java_date; dateTime.recycle; d }
}]]></xp:this.value>
</xp:dataContext>