class Rufo::Formatter
def visit_block_arguments(node)
def visit_block_arguments(node) # [:block_var, params, local_params] _, params, local_params = node empty_params = empty_params?(params) check :on_op # check for || if empty_params && !local_params # Don't write || as it's meaningless if current_token_value == "|" next_token skip_space_or_newline check :on_op next_token else next_token end return end consume_token :on_op found_semicolon = skip_space_or_newline(_want_semicolon: true, write_first_semicolon: true) if found_semicolon # Nothing elsif empty_params && local_params consume_token :on_semicolon end skip_space_or_newline unless empty_params visit params skip_space end if local_params if semicolon? consume_token :on_semicolon consume_space end visit_comma_separated_list local_params else skip_space_or_newline end consume_op "|" end