This would read better as ternery operator (`code = success ? 0 : 1`).  This would also conform to the [styleguide](https://github.com/alphagov/styleguides/blob/master/ruby.md#syntax).