2017-09-14 06:41:01 +02:00
|
|
|
//
|
|
|
|
// DatabaseObject+Database.swift
|
2019-07-09 07:22:31 +02:00
|
|
|
// NetNewsWire
|
2017-09-14 06:41:01 +02:00
|
|
|
//
|
|
|
|
// Created by Brent Simmons on 9/13/17.
|
|
|
|
// Copyright © 2017 Ranchero Software. All rights reserved.
|
|
|
|
//
|
|
|
|
|
|
|
|
import Foundation
|
|
|
|
import RSDatabase
|
2018-07-24 03:29:08 +02:00
|
|
|
import Articles
|
2017-09-14 06:41:01 +02:00
|
|
|
|
|
|
|
extension Array where Element == DatabaseObject {
|
|
|
|
|
|
|
|
func asAuthors() -> Set<Author>? {
|
|
|
|
let authors = Set(self.map { $0 as! Author })
|
|
|
|
return authors.isEmpty ? nil : authors
|
|
|
|
}
|
|
|
|
}
|