1

Is there a tool that parses a Ruby script (MRI/YARV) and gives statistics of how many lines each module/class/method definition is?

Andrew Grimm
  • 78,473
  • 57
  • 200
  • 338
sawa
  • 165,429
  • 45
  • 277
  • 381

2 Answers2

2

Saikuro will do this. It's also included in metric_fu, which makes it easy to run Saikuro and many other code metrics tools.

(Be careful, the saikuro gem is probably not what you want, instead it's Saikuro with a capital "S".)

Andrew Marshall
  • 95,083
  • 20
  • 220
  • 214
  • @AndrewGrimm Yea I have no idea what the other (lowercase) one is. The description seems similar, but it's not what metric_fu uses, which is what I'm basing which is the "better" one on. – Andrew Marshall Apr 12 '12 at 03:25
1

What do you mean by MRI/YARV? A script doesn't have an implementation associated with it. The tool may be associated with a particular implementation, though.

There may be such a tool in the code metrics section of Ruby Toolbox.

Andrew Grimm
  • 78,473
  • 57
  • 200
  • 338