An enum can be marked with
@[Flags]. This changes the default values.
The first constant's value is 1, and successive constants are multiplied by 2.
@[Flags] enum IOMode Read # 1 Write # 2 Async # 4 end (IOMode::Write | IOMode::Async).value # => 6 puts IOMode::Write | IOMode::Async # => Write | Async