End of Life Ruby 3.2 has reached end of life and gets no more fixes. Switch to Ruby 4.0 →
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-3.2.0/lib/syntax_suggest/capture_code_context.rb, line 80
def capture_falling_indent(block)
AroundBlockScan.new(
block: block,
code_lines: @code_lines
).on_falling_indent 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
4.0 · 3.4 · 3.3