P
Pokkai Dokkai
i don't know how to explain my problem
here i am showing it by an example
<%
string="Hello Ruby ,How are you" # any String object
width=28 # because width of the below erb tag
is 28
%>
<%=p "%#{-width}s"%string %>
the answer is
=>"Hello Ruby ,How are you "
in above erb tag ("<%=p "%#{-width}s"%string%>") length is 28
so i assigned width=28
here is my question
how to define the width at dynamically for any type of erb tags ?
here i am showing it by an example
<%
string="Hello Ruby ,How are you" # any String object
width=28 # because width of the below erb tag
is 28
%>
<%=p "%#{-width}s"%string %>
the answer is
=>"Hello Ruby ,How are you "
in above erb tag ("<%=p "%#{-width}s"%string%>") length is 28
so i assigned width=28
here is my question
how to define the width at dynamically for any type of erb tags ?