class Rufo::Formatter
def visit_call_with_receiver(node)
def visit_call_with_receiver(node) # [:call, obj, :".", name] _, obj, text, name = node @dot_column = nil visit obj skip_space if newline? || comment? consume_end_of_line if @align_chained_calls @name_dot_column = @dot_column || next_indent write_indent(@dot_column || next_indent) else @name_dot_column = next_indent write_indent(next_indent) end end # Remember dot column dot_column = @column consume_call_dot skip_space if newline? || comment? consume_end_of_line write_indent(next_indent) else skip_space_or_newline end if name == :call # :call means it's .() else visit name end # Only set it after we visit the call after the dot, # so we remember the outmost dot position @dot_column = dot_column end