Move to ruby

This should not be an ``attr_accessor`` imo, I'd go for
```ruby
def current_state
  @current_state ||= 0 
end
```