Method: Pry::Method#source_range
- Defined in:
- lib/pry/method.rb
#source_range ⇒ Range?
Returns The range of lines in ‘source_file` which contain the method’s definition, or ‘nil` if that information is unavailable.
367 368 369 |
# File 'lib/pry/method.rb', line 367 def source_range source_location.nil? ? nil : (source_line)..(source_line + source.lines.count - 1) end |