Return an array of lines numbers that could be stopped at given a file name of a Ruby program.
# File lib/tracelines19.rb, line 21 def lnums_for_file(file) lnums_for_str(File.read(file)) end
Return an array of lines numbers that could be stopped at given a file name of a Ruby program. We assume the each line has n at the end. If not set the newline parameters to n.
# File lib/tracelines19.rb, line 30 def lnums_for_str_array(string_array, newline='') lnums_for_str(string_array.join(newline)) end
Return an array of lines numbers that could be stopped at given a file name of a Ruby program.
# File lib/tracelines19.rb, line 21 def lnums_for_file(file) lnums_for_str(File.read(file)) end
Return an array of lines numbers that could be stopped at given a file name of a Ruby program. We assume the each line has n at the end. If not set the newline parameters to n.
# File lib/tracelines19.rb, line 30 def lnums_for_str_array(string_array, newline='') lnums_for_str(string_array.join(newline)) end