Module: Rubyzen::Providers::LineNumberProvider
- Included in:
- Declarations::AttributeDeclaration, Declarations::BlockDeclaration, Declarations::CallSiteDeclaration, Declarations::ClassDeclaration, Declarations::ConstantDeclaration, Declarations::FileDeclaration, Declarations::IfStatementDeclaration, Declarations::MacroDeclaration, Declarations::MethodDeclaration, Declarations::ModuleDeclaration, Declarations::ParameterDeclaration, Declarations::RaiseDeclaration, Declarations::RequireDeclaration, Declarations::RescueDeclaration
- Defined in:
- lib/rubyzen/providers/line_number_provider.rb
Overview
Provides access to the starting line number of a declaration in its source file.
Instance Method Summary collapse
-
#line ⇒ Integer
The line number where this declaration begins.
Instance Method Details
#line ⇒ Integer
Returns the line number where this declaration begins.
6 7 8 |
# File 'lib/rubyzen/providers/line_number_provider.rb', line 6 def line node.loc.expression.line end |