class Rufo::Formatter

def visit_ternary_if(node)

def visit_ternary_if(node)
  # cond ? then : else
  #
  # [:ifop, cond, then_body, else_body]
  _, cond, then_body, else_body = node
  visit cond
  consume_one_dynamic_space @spaces_in_ternary
  consume_op "?"
  consume_one_dynamic_space_or_newline @spaces_in_ternary
  visit then_body
  consume_one_dynamic_space @spaces_in_ternary
  consume_op ":"
  consume_one_dynamic_space_or_newline @spaces_in_ternary
  visit else_body
end