> you're kidding right? quality (of _any_ kind) can _not_ be determined by
> the ratio of comment to code.
>
> For example (from your own example):
>

>
> That apparently has GREAT quality as the ratio is 20:3 (depending on how
> you count it)... That's much much much better than the 1:2 ratio you're
> setting as your bar, right? Right??
>
> So, by that same logic, the following would be 20:13, that's down to
> ~3/2, not nearly as good:
>
> But it's the same exact code!
>
> Now let's look at your actual comment block:
>
>
> I'd have written the comment as:
>
> ##
> # Returns a hash mapping the day code (including leave and holiday) to
> its name.
>
> That drops me from 20:13 to 2:13. That makes mine bad, right?
>
> Before I knew what you were trying to do, I would have probably
> recommended looking at ruby_parser to figure out your line number
> problem. But now that I know, I wouldn't. It has like... almost NO
> comments:
>


Kindly don't deviate the topic.
I want to extract only the function code.
Tell me how can we extract only the function code.
How to identify in which line the function is ending.
I want to extract like this for each functions in a ruby file.

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