Toggle features with a boolean

I had a need to toggle a feature based on a boolean, and rather than write an if statement to send activate or deactivate, it would be nice if the Rollout object had a method that set the state with a boolean.