         }
     }
     
-    var state = State.Ready {
+    public var state = State.Ready {
         willSet {
             willChangeValueForKey(newValue.keyPath)
             willChangeValueForKey(state.keyPath)


import Foundation

class AbstractOperation: NSOperation {
    enum State: String {
        case Ready, Executing, Finished
        
        private var keyPath: String {

        state = .Executing
    }
    
    public override func cancel() {
        state = .Finished
    }
}
