@jswoods what do you think about replacing it to `case` clause ? Can be more concise IMO:

```ruby
check_state = case state
  when 0
    'ok'
  when 1
  ...
```