mirror of
https://github.com/Ranchero-Software/NetNewsWire.git
synced 2024-12-11 17:06:46 +01:00
20 lines
398 B
Swift
20 lines
398 B
Swift
//
|
|
// DatabaseObject+Database.swift
|
|
// NetNewsWire
|
|
//
|
|
// Created by Brent Simmons on 9/13/17.
|
|
// Copyright © 2017 Ranchero Software. All rights reserved.
|
|
//
|
|
|
|
import Foundation
|
|
import RSDatabase
|
|
import Articles
|
|
|
|
extension Array where Element == DatabaseObject {
|
|
|
|
func asAuthors() -> Set<Author>? {
|
|
let authors = Set(self.map { $0 as! Author })
|
|
return authors.isEmpty ? nil : authors
|
|
}
|
|
}
|