Module: Rubyzen::Providers::LinesOfCodeProvider
- Included in:
- Declarations::BlockDeclaration, Declarations::ClassDeclaration, Declarations::FileDeclaration, Declarations::MethodDeclaration, Declarations::ModuleDeclaration
- Defined in:
- lib/rubyzen/providers/lines_of_code_provider.rb
Overview
Provides the number of lines of code a declaration spans.
Instance Method Summary collapse
-
#lines_of_code ⇒ Integer
The total number of source lines in this declaration.
Instance Method Details
#lines_of_code ⇒ Integer
Returns 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 |