From: Harry Truax Date: 2011-07-28T02:57:02+09:00 Subject: Re: Counting lines of code in a ruby code file ignoring method code lines in the process --001636e90ec16b510204a910c60d Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable Thanks Jesus, I will take a look. 2011/7/27 Jes=FAs Gabriel y Gal=E1n > On Wed, Jul 27, 2011 at 6:40 PM, Harry Truax wrote: > > Thanks for the reply Peter. Yeah, I thought about something like that, > but > > there could be a method where the end is on the same line as the > > corresponding statement, like > > > > def do_this (y) x =3D y + 10 end > > > > or inside the method like > > > > if (x < y) x =3D y end > > > > I also thought about looking for a code line that started with 'end' an= d > > using that to conclude that the method was finished, but someone could > have > > mistakenly typed a space char in fron t of it when writing it. > > > > Appreciate your help! > > Maybe you could take a look at ruby_parser or parse_tree. I currently > don't know how to implement your requirement with them, but I guess it > should be possible. > > Jesus. > > --=20 Harry Truax Phone: 315.463.8506 Email: htruax@stf.com 26 Corporate Circle East Syracuse, NY 13057 --001636e90ec16b510204a910c60d--