 // MARK: Foundation Extensions
 
 extension NSBundle {
+    /// The marketing version number of the bundle.
     public var version : Version? {
         return self.versionFromInfoDicitionary(forKey: String(kCFBundleVersionKey))
     }
     
+    /// The short version number of the bundle.
     public var shortVersion : Version? {
         return self.versionFromInfoDicitionary(forKey: "CFBundleShortVersionString")
     }

import Foundation


public struct Version {
    public var major: Int
    public var minor: Int?
    public var patch: Int?
    public var prerelease: String?
    public var build: String?
    
    public init(major: Int = 0, minor: Int? = nil, patch: Int? = nil, prerelease: String? = nil, build: String? = nil) {
        self.major = major
        self.minor = minor

        self.build = version.build
    }
    
    /// Parse a version number from a string representation.
    ///
    /// - Parameter value: the string representations
    /// - Returns: the parsed version number or `nil`,
    ///   if the version is invalid.
    ///
    public static func parse(value: String) -> Version? {
        let parts = pattern.groupsOfFirstMatch(value)
        
