Method: YARD::Parser::Ruby::Legacy::Statement#line_range

Defined in:
lib/yard/parser/ruby/legacy/statement.rb

#line_rangeRange<Fixnum>

Returns the first to last lines of Ruby source.

Returns:

  • (Range<Fixnum>)

    the first to last lines of Ruby source

Since:

  • 0.5.4


49
50
51
# File 'lib/yard/parser/ruby/legacy/statement.rb', line 49

def line_range
  tokens.first.line_no..tokens.last.line_no
end