mirror of
https://github.com/Ranchero-Software/NetNewsWire.git
synced 2024-12-18 20:34:46 +01:00
31 lines
658 B
Swift
31 lines
658 B
Swift
//
|
|
// NSApplication+Scriptability.swift
|
|
// Evergreen
|
|
//
|
|
// Created by Olof Hellman on 1/8/18.
|
|
// Copyright © 2018 Olof Hellman. All rights reserved.
|
|
//
|
|
|
|
import Cocoa
|
|
import Account
|
|
|
|
extension NSApplication : ScriptingObjectContainer {
|
|
|
|
var scriptingClassDescription: NSScriptClassDescription {
|
|
return NSApplication.shared.classDescription as! NSScriptClassDescription
|
|
}
|
|
|
|
var scriptingKey: String {
|
|
return "application"
|
|
}
|
|
|
|
@objc(accounts)
|
|
func accounts() -> NSArray {
|
|
let accounts = AccountManager.shared.accounts
|
|
return accounts.map { ScriptableAccount($0) } as NSArray
|
|
}
|
|
|
|
}
|
|
|
|
|