Skip to content

Commit 8564f5f

Browse files
committed
Make functions public
1 parent 5a38f18 commit 8564f5f

2 files changed

Lines changed: 4 additions & 4 deletions

File tree

Sources/MSLCoreData/Utilities/CoreDataPublisher.swift

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,13 +2,13 @@ import Combine
22
import CoreData
33
import MSLFoundation
44

5-
protocol ModelConvertible {
5+
public protocol ModelConvertible {
66
associatedtype Model: Any
77
func toModel() -> Model
88
}
99

1010
/// Wraps NSFetchedResultsController and converts the delegate callback methods into a publisher (stream)
11-
final class CoreDataPublisher<
11+
public final class CoreDataPublisher<
1212
EntityType: ModelConvertible & NSFetchRequestResult
1313
>: NSObject, NSFetchedResultsControllerDelegate, Publishing {
1414
private(set) var fetchedRequestController: NSFetchedResultsController<EntityType>
@@ -44,7 +44,7 @@ final class CoreDataPublisher<
4444
}
4545
}
4646

47-
func controllerDidChangeContent(_ controller: NSFetchedResultsController<NSFetchRequestResult>) {
47+
public func controllerDidChangeContent(_ controller: NSFetchedResultsController<NSFetchRequestResult>) {
4848
guard let controller = controller as? NSFetchedResultsController<EntityType> else { return }
4949
self.emitObjects(for: controller)
5050
}

Sources/MSLCoreData/documentation/coredata_publisher.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,7 @@ func buildDataStore() -> DataStore<[MySharedModel]> {
4646
cacheName: nil
4747
)
4848

49-
let publisher = DataStorePublisher<MyEntity>(
49+
let publisher = CoreDataPublisher<MyEntity>(
5050
fetchedRequestController: controller
5151
)
5252

0 commit comments

Comments
 (0)