Defined the Locationable protocol in the library target.
This commit is contained in:
parent
212ca52279
commit
5e35f12bb3
21
Library/Sources/Public/Protocols/Locationable.swift
Normal file
21
Library/Sources/Public/Protocols/Locationable.swift
Normal file
@ -0,0 +1,21 @@
|
||||
import Foundation
|
||||
|
||||
public protocol Locationable {
|
||||
|
||||
// MARK: Properties
|
||||
|
||||
var location: String? { get set }
|
||||
|
||||
}
|
||||
|
||||
// MARK: - Locationable+Properties
|
||||
|
||||
public extension Locationable {
|
||||
|
||||
// MARK: Properties
|
||||
|
||||
var locationURL: URL? {
|
||||
location.flatMap { URL(fileURLWithPath: $0) }
|
||||
}
|
||||
|
||||
}
|
Loading…
x
Reference in New Issue
Block a user