class Rufo::Formatter
def visit_BEGIN_or_END(node, keyword)
def visit_BEGIN_or_END(node, keyword) # [:BEGIN, body] _, body = node consume_keyword(keyword) consume_space closing_brace_token, _index = find_closing_brace_token # If the whole block fits into a single line, format # in a single line if current_token[0][0] == closing_brace_token[0][0] consume_token :on_lbrace consume_space visit_exps body, false, false consume_space consume_token :on_rbrace else consume_token :on_lbrace indent_body body write_indent consume_token :on_rbrace end end