Method: WorkingSetItem#inspect
- Defined in:
- lib/working_set_item.rb
#inspect ⇒ Object
14 15 16 17 18 19 20 21 22 23 24 25 26 |
# File 'lib/working_set_item.rb', line 14 def inspect str = "#{file_path}\n" pre_match_lines.each_with_index do |line, idx| str += "#{row - pre_match_lines.size + idx}- #{line}\n" end str += "#{row}: #{match_line}\n" offset = column + row.to_s.length + 1 str += sprintf "%#{offset}s%s", " ", "^\n" post_match_lines.each_with_index do |line, idx| str += "#{row + 1 + idx}- #{line}\n" end str end |