lib/pry-test/test_wrapper.rb
def line_info(location)
      lines = File.open(location.absolute_path).readlines
      {
        lines: lines,
        line: lines[location.lineno]
      }
    end
# Builds a Hash of line/source information for the given call stack location.
#
# @param [Thread::Backtrace::Location] location The call stack location to extract info from.
#
# @example
#   {
#     :lines => ["line one", "line two"]
#     :line => "line two"
#   }
#
# @return [Hash]
Builds a Hash of line/source information for the given call stack location.
Builds a Hash of line / source information for the given call stack location .
def line_info(location)
      lines = File.open(location.absolute_path).readlines
      {
        lines: lines,
        line: lines[location.lineno]
      }
    end
def line_info ( location ) lines = File . open ( location . absolute_path ) . readlines { lines : lines , line : lines [ location . lineno ] } end
Builds a Hash of line/source information for the given call stack location.
Builds a Hash of line / source information for the given call stack location .
None
Hash
location
location The call stack location to extract info from.
location The call stack location to extract info from .
example
None