As you're using ruby to make the iteration I assume It's ok if you use some additional ruby code to make it work, so just put some simple code to solve this and output it with a "=". I think this is the easiest way to do it:
- (1..4).each do |i|
%p= i.to_s + (i.even? ? " - b" : " - a")