Module: Rubyzen::Providers::LineNumberProvider

Overview

Provides access to the starting line number of a declaration in its source file.

Instance Method Summary collapse

Instance Method Details

#lineInteger

Returns the line number where this declaration begins.

Returns:

  • (Integer)

    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