[lnkForumImage]
TotalShareware - Download Free Software

Confronta i prezzi di migliaia di prodotti.
Asp Forum
 Home | Login | Register | Search 


 

Forums >

comp.lang.ruby

Comment for partial line

Xia __

2/7/2007 12:10:00 AM

Hi

Can someone confirm that Ruby only allows #tail of line commenting and
=begin
this
whole
block
commenting
=end


and not <some comment syntax here>partial line <end comment
syntax>commenting?

and if so, i request this be changed! its really annoying not being able
to do a partial line comment in rhtml

thanks

--
Posted via http://www.ruby-....

10 Answers

Jeremy McAnally

2/7/2007 1:14:00 AM

0

You can do HTML comments in RHTML you know. ;)

--Jeremy

On 2/6/07, Xia __ <rebeccacannon@gmail.com> wrote:
> Hi
>
> Can someone confirm that Ruby only allows #tail of line commenting and
> =begin
> this
> whole
> block
> commenting
> =end
>
>
> and not <some comment syntax here>partial line <end comment
> syntax>commenting?
>
> and if so, i request this be changed! its really annoying not being able
> to do a partial line comment in rhtml
>
> thanks
>
> --
> Posted via http://www.ruby-....
>
>


--
http://www.jeremymca...

My free Ruby e-book:
http://www.humblelittlerubybook...

My blogs:
http://www.mrneigh...
http://www.rubyinpra...

Michael Fellinger

2/7/2007 1:28:00 AM

0

Either, <!-- this commet style -->
or...

<% do_stuff; "comment on it"; do_more; "more comments" %>

but please, if you need to document a template... move that stuff into
the controller...

On 2/7/07, Xia __ <rebeccacannon@gmail.com> wrote:
> Hi
>
> Can someone confirm that Ruby only allows #tail of line commenting and
> =begin
> this
> whole
> block
> commenting
> =end
>
>
> and not <some comment syntax here>partial line <end comment
> syntax>commenting?
>
> and if so, i request this be changed! its really annoying not being able
> to do a partial line comment in rhtml
>
> thanks
>
> --
> Posted via http://www.ruby-....
>
>

Xia __

2/7/2007 1:55:00 AM

0

its more for bug tracking; to be able to remove functionality
temporarily to see what is broken, so more like

<% do_stuff; /* HIDE THE FOLLOWING FROM RUBY do_more; */ %>

--
Posted via http://www.ruby-....

Marcello Barnaba

2/7/2007 2:46:00 AM

0

On Wednesday 07 February 2007 02:55, Xia __ wrote:
> its more for bug tracking; to be able to remove functionality
> temporarily to see what is broken, so more like
>
> <% do_stuff; /* HIDE THE FOLLOWING FROM RUBY do_more; */ %>

that means that perhaps you have way too much logic in your template, and you
should better move that logic into the controller. it isn't just a matter of
taste, it's a matter of good design :).

HTH
--
pub 1024D/8D2787EF 723C 7CA3 3C19 2ACE 6E20 9CC1 9956 EB3C 8D27 87EF

Xia __

2/7/2007 2:50:00 AM

0

too much logic being a rails form helper?


--
Posted via http://www.ruby-....

Xia __

2/7/2007 2:50:00 AM

0

i dont want to turn this thread into a debate about programming design,
i just want to know if ruby offers a fairly simple syntax function which
is available in many languages.

--
Posted via http://www.ruby-....

Michael Fellinger

2/7/2007 3:15:00 AM

0

On 2/7/07, Xia __ <rebeccacannon@gmail.com> wrote:
> i dont want to turn this thread into a debate about programming design,
> i just want to know if ruby offers a fairly simple syntax function which
> is available in many languages.

no.

Xia __

2/7/2007 3:39:00 AM

0

Michael Fellinger wrote:
> On 2/7/07, Xia __ <rebeccacannon@gmail.com> wrote:
>> i dont want to turn this thread into a debate about programming design,
>> i just want to know if ruby offers a fairly simple syntax function which
>> is available in many languages.
>
> no.

cool thanks michael.

i think there may be some argument for it to be supported in the case of
erb in rhtml; mostly due to common html markup style which is different
to ruby due to line spacing and inline elements in html

--
Posted via http://www.ruby-....

Xia __

2/7/2007 3:45:00 AM

0

no comment...


--
Posted via http://www.ruby-....

Alex Young

2/7/2007 9:20:00 AM

0

Xia __ wrote:
> no comment...
>
>
I thought that was the problem? :-)

--
Alex