Skip to content

Commit

Permalink
make functions public
Browse files Browse the repository at this point in the history
  • Loading branch information
ra1028 committed Jan 25, 2018
1 parent 0657a06 commit 286864b
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 6 deletions.
2 changes: 1 addition & 1 deletion Example/Sources/CounterViewController.swift
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ private extension CounterViewController {

store.computed.command
.observe(on: .mainThread)
.subscribe(duringScopeOf: self) { [unowned self] command in
.observe(duringScopeOf: self) { [unowned self] command in
switch command {
case .openGitHub:
guard let url = URL(string: "https://github.com/ra1028/VueFlux") else { return }
Expand Down
10 changes: 5 additions & 5 deletions VueFluxReactive/Signal.swift
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ public struct Signal<Value> {
///
/// - Returns: A disposable to unregister given observer.
@discardableResult
func observe(duringScopeOf object: AnyObject, _ observer: @escaping (Value) -> Void) -> Disposable {
public func observe(duringScopeOf object: AnyObject, _ observer: @escaping (Value) -> Void) -> Disposable {
let disposable = observe(observer)
DisposableScope.associated(with: object) += disposable
return disposable
Expand All @@ -44,7 +44,7 @@ public struct Signal<Value> {
///
/// - Returns: A disposable to unbind given binder.
@discardableResult
func bind(to binder: Binder<Value>) -> Disposable {
public func bind(to binder: Binder<Value>) -> Disposable {
return binder.bind(signal: self)
}

Expand All @@ -56,7 +56,7 @@ public struct Signal<Value> {
///
/// - Returns: A disposable to unbind given target.
@discardableResult
func bind<Target: AnyObject>(to target: Target, binding: @escaping (Target, Value) -> Void) -> Disposable {
public func bind<Target: AnyObject>(to target: Target, binding: @escaping (Target, Value) -> Void) -> Disposable {
return bind(to: .init(target: target, binding: binding))
}

Expand All @@ -68,7 +68,7 @@ public struct Signal<Value> {
///
/// - Returns: A disposable to unbind given target.
@discardableResult
func bind<Target: AnyObject>(to target: Target, _ keyPath: ReferenceWritableKeyPath<Target, Value>) -> Disposable {
public func bind<Target: AnyObject>(to target: Target, _ keyPath: ReferenceWritableKeyPath<Target, Value>) -> Disposable {
return bind(to: target) { target, value in
target[keyPath: keyPath] = value
}
Expand All @@ -82,7 +82,7 @@ public struct Signal<Value> {
///
/// - Returns: A disposable to unbind given target.
@discardableResult
func bind<Target: AnyObject>(to target: Target, _ keyPath: ReferenceWritableKeyPath<Target, Value?>) -> Disposable {
public func bind<Target: AnyObject>(to target: Target, _ keyPath: ReferenceWritableKeyPath<Target, Value?>) -> Disposable {
return bind(to: target) { target, value in
target[keyPath: keyPath] = value as Value?
}
Expand Down

0 comments on commit 286864b

Please sign in to comment.