 
 extension EKAuthorizationStatus: AuthorizationStatusType {
 
+    /**
+     Determine whether access has been granted given the EKAuthorizationStatus.
+     
+     - parameter requirement: the required EKEntityType
+     - returns: a true Bool for authorized status
+    */
     public func isRequirementMet(requirement: EKEntityType) -> Bool {
         if case .Authorized = self {
             return true


import EventKit

public protocol EventsCapabilityRegistrarType: CapabilityRegistrarType {
    func opr_authorizationStatusForRequirement(requirement: EKEntityType) -> EKAuthorizationStatus
    func opr_requestAccessForRequirement(requirement: EKEntityType, completion: EKEventStoreRequestAccessCompletionHandler)
}

extension EKEventStore: EventsCapabilityRegistrarType {

    public func opr_authorizationStatusForRequirement(requirement: EKEntityType) -> EKAuthorizationStatus {
        return EKEventStore.authorizationStatusForEntityType(requirement)
    }

    public func opr_requestAccessForRequirement(requirement: EKEntityType, completion: EKEventStoreRequestAccessCompletionHandler) {
        requestAccessToEntityType(requirement, completion: completion)
    }

        super.init()
    }

    /// - returns: true, EventKit is always available
    public func isAvailable() -> Bool {
        return true
    }

    /**
     Get the current authorization status of EventKit from the Registrar.
     - parameter completion: a Status -> Void closure.
     */
    public func authorizationStatus(completion: EKAuthorizationStatus -> Void) {
        completion(registrar.opr_authorizationStatusForRequirement(requirement))
    }

    /**
     Request authorization to EventKit from the Registrar.
     - parameter completion: a dispatch_block_t
     */
    public func requestAuthorizationWithCompletion(completion: dispatch_block_t) {
        let status = registrar.opr_authorizationStatusForRequirement(requirement)
        switch status {
