23 lines
285 B
Text
23 lines
285 B
Text
$ erubis -X example11.rhtml
|
|
_buf = '';
|
|
|
|
|
|
|
|
|
|
|
|
if @list.nil? || @list.empty?
|
|
|
|
else
|
|
|
|
|
|
@list.each_with_index do |item, i|
|
|
_buf << ( i % 2 == 0 ? '#FCC' : '#CCF' ).to_s;
|
|
_buf << ( item ).to_s;
|
|
|
|
end
|
|
|
|
|
|
end
|
|
|
|
|
|
_buf.to_s
|