It might be instructive to look at the code for the cycle method. It actually creates an object and calls its to_s method each time you call ‘cycle’.
You could do a similar thing. Create a small class with a ‘to_s’ method that returns something the first time, but nothing thereafter.
@value = first_value
@value = ‘’
value = @value
Stick that in lib/ or include it some other way. Then you can call cycle, but pass your object as a single argument to cycle (cycle doesn’t require actually more than one param, though you could pass your object as both params, or just pass it as the first param and ‘’ as the second):
<% label_once = Once.new(’_bar’) %>
Might be a bit overkill, but kind of fun.