How to define a multi line comment

11 views
Skip to first unread message

Kushan Jayathilake

unread,
Feb 14, 2007, 5:57:43 AM2/14/07
to rubyonra...@googlegroups.com
Hi All
 
Is there who knows to define multi line comment? ( in Java we can define by
/* and */ )
 
Best Regards
 
Kushan Jayathilake

Thorsten L

unread,
Feb 14, 2007, 6:57:14 AM2/14/07
to Ruby on Rails: Talk
you mean in Ruby? like this

=begin
blablabla
bablablabl
abklabla
=end

On 14 Feb., 11:57, "Kushan Jayathilake" <kushan.ra...@gmail.com>
wrote:

Kushan Jayathilake

unread,
Feb 14, 2007, 10:06:15 PM2/14/07
to rubyonra...@googlegroups.com
 
 
Yes,I want to know how to define a multiline comment in rails,
In Java we can define it like this
/*
Comment line 1
Comment line 2
Comment line 3
*/
 Anything between /* and */ will be commented
 
So is there anyway that I can do this in rails
 
-------Original Message-------

Mohit Sindhwani

unread,
Feb 14, 2007, 10:48:35 PM2/14/07
to rubyonra...@googlegroups.com
Hi Kushan

Thorsten did answer your question. I've changed it to look similar to
your request.

=begin


Comment line 1
Comment line 2
Comment line 3

=end

Hmm, I wonder if Thorsten's reply looked too much like English and got
ignored? :)

Cheers
Mohit.


Kushan Jayathilake wrote:
> Hello Thorsten L <mailto:dupl...@googlemail.com>


>
>
> Yes,I want to know how to define a multiline comment in rails,
> In Java we can define it like this
> /*
> Comment line 1
> Comment line 2
> Comment line 3
> */
> Anything between /* and */ will be commented
>
> So is there anyway that I can do this in rails
>

> /-------Original Message-------/
>
> /*From:*/ Thorsten L <mailto:dupl...@googlemail.com>
> /*Date:*/ 2/14/2007 5:57:35 PM
> /*To:*/ Ruby on Rails: Talk <mailto:rubyonra...@googlegroups.com>
> /*Subject:*/ [Rails] Re: How to define a multi line comment


>
> you mean in Ruby? like this
>
> =begin
> blablabla
> bablablabl
> abklabla
> =end
>
> On 14 Feb., 11:57, "Kushan Jayathilake" <kushan.ra...@gmail.com

> <mailto:kushan.ra...@gmail.com>>

javier ramirez

unread,
Feb 26, 2007, 4:12:25 AM2/26/07
to rubyonra...@googlegroups.com

> =begin
> blablabla
> bablablabl
> abklabla
> =end
>
just keep in mind that kind of comments are reserved for ruby doc, so
best practices would tell not to use them unless for that purpose..
which leaves us without a general purpose multi line comment in ruby (AFAIK)

regards,

javier ramirez

--
--------
Estamos de estreno... si necesitas llevar el control de tus gastos
visita http://www.gastosgem.com !!Es gratis!!


Reply all
Reply to author
Forward
0 new messages