This block is pretty wordy. What about something like this pseudocode:
```
switch @character
  when ']' then '['
  when '[' then ']'
  ...
  else ''

@reverse = true if _.contains(['(', '[', '{')], @character)
```