Skip to content

Commit

Permalink
Fix typos in README and documentation
Browse files Browse the repository at this point in the history
  • Loading branch information
vadymmarkov committed Aug 8, 2018
1 parent 0f8860f commit 468a780
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 6 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -312,7 +312,7 @@ storage.removeExpiredObjects()
[Storage](#storage) allows you to observe changes in the cache layer, both on
a store and a key levels. The API lets you pass any object as an observer,
while also passing an observation closure. The observation closure will be
removed automatically when the weekly captured observer has been deallocated.
removed automatically when the weakly captured observer has been deallocated.

## Storage observations

Expand Down
9 changes: 6 additions & 3 deletions Source/Shared/Storage/KeyObservationRegistry.swift
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,8 @@ public protocol KeyObservationRegistry {

/**
Registers observation closure which will be removed automatically
when the weekly captured observer has been deallocated.
- Parameter observer: Any object that helps to determine if the observation is still valid
when the weakly captured observer has been deallocated.
- Parameter observer: Any object that helps determine if the observation is still valid
- Parameter key: Unique key to identify the object in the cache
- Parameter closure: Observation closure
- Returns: Token used to cancel the observation and remove the observation closure
Expand All @@ -19,7 +19,10 @@ public protocol KeyObservationRegistry {
closure: @escaping (O, S, KeyChange<S.T>) -> Void
) -> ObservationToken

/// Removes observer by the given key.
/**
Removes observer by the given key.
- Parameter key: Unique key to identify the object in the cache
*/
func removeObserver(forKey key: String)

/// Removes all registered key observers
Expand Down
4 changes: 2 additions & 2 deletions Source/Shared/Storage/StorageObservationRegistry.swift
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,8 @@ public protocol StorageObservationRegistry {

/**
Registers observation closure which will be removed automatically
when the weekly captured observer has been deallocated.
- Parameter observer: Any object that helps to determine if the observation is still valid
when the weakly captured observer has been deallocated.
- Parameter observer: Any object that helps determine if the observation is still valid
- Parameter closure: Observation closure
- Returns: Token used to cancel the observation and remove the observation closure
*/
Expand Down

0 comments on commit 468a780

Please sign in to comment.