instance method extract_source_fragment_lines

Ruby on Rails 7.1.6

Since v7.1.6 Private

Available in: v7.1.6 v7.2.3 v8.0.4 v8.1.2

Signature

extract_source_fragment_lines(source_lines, line)

No documentation comment.

Parameters

source_lines req
line req
Source
# File actionpack/lib/action_dispatch/middleware/exception_wrapper.rb, line 335
      def extract_source_fragment_lines(source_lines, line)
        start = [line - 3, 0].max
        lines = source_lines.drop(start).take(6)
        Hash[*(start + 1..(lines.count + start)).zip(lines).flatten]
      end

Defined in actionpack/lib/action_dispatch/middleware/exception_wrapper.rb line 335 · View on GitHub · Improve this page · Find usages on GitHub

Defined in ActionDispatch::ExceptionWrapper

Type at least 2 characters to search.

↑↓ navigate · open · esc close