Module: Rubyzen::Providers::LinesOfCodeProvider

Overview

Provides the number of lines of code a declaration spans.

Instance Method Summary collapse

Instance Method Details

#lines_of_codeInteger

Returns the total number of source lines in this declaration.

Returns:

  • (Integer)

    the total number of source lines in this declaration



6
7
8
# File 'lib/rubyzen/providers/lines_of_code_provider.rb', line 6

def lines_of_code
  node.loc.expression.source.split("\n").size
end