instance method
SyntaxSuggest::CaptureCodeContext#capture_falling_indent
capture_falling_indent(block)
lib/syntax_suggest/capture_code_context.rb
View on GitHub ↗
# File tmp/rubies/ruby-4.0.0/lib/syntax_suggest/capture_code_context.rb, line 91
def capture_falling_indent(block)
Capture::FallingIndentLines.new(
block: block,
code_lines: @code_lines
).call do |line|
@lines_to_output << line
end
end
Shows the context around code provided by “falling” indentation
Converts:
it "foo" do
into:
class OH
def hello
it "foo" do
end
end
See also
#capture_before_after_kws
#capture_first_kw_end_same_indent
#call
#capture_last_end_same_indent
also in
3.4 · 3.3 · 3.2