tags:

views:

56

answers:

3

this code

= 5.times {|n| puts "<BR>"}

does nothing for me ...

+1  A: 

You can use % to specifically add a tag. So, for 5
do

%br/
%br/
%br/
%br/
%br/

But: why would you want to do this? It would probably be a better idea to use a %div and set the spacing in CSS rather than multiple BR tags.

Joshua Smith
I agree with Joshua. Don't use BR tags.
Jeremy Weiskotten
I just needed to divide some text during my debugging and also I was sure I can do it easily in ruby but didn't figure out how..
Radek
+5  A: 
- 5.times do
  %br
Jeremy Weiskotten
very nice beautiful :-)
Radek
I still wouldn't use br tags.
Jeremy Weiskotten
+1  A: 

Another way:

= "<br/>"*5
Brian Deterling
@Brian Deterling: I like yours better ;-) Thank you for that
Radek