instance method
extract_source_fragment_lines
Ruby on Rails 8.0.4
Since v7.1.6 PrivateSignature
extract_source_fragment_lines(source_lines, line)
No documentation comment.
Parameters
-
source_linesreq -
linereq
Source
# File actionpack/lib/action_dispatch/middleware/exception_wrapper.rb, line 324
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 324
· View on GitHub
· Improve this page
· Find usages on GitHub
Defined in ActionDispatch::ExceptionWrapper