Skip to content

Commit 28c6d23

Browse files
committed
Merge pull request #73 from neilpa/docs
Few missing docs
2 parents 590b569 + 357513f commit 28c6d23

File tree

3 files changed

+16
-3
lines changed

3 files changed

+16
-3
lines changed

Source/Foundation/NSData.swift

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,8 +10,7 @@ import Foundation
1010
import ReactiveCocoa
1111

1212
extension NSData {
13-
/// Read the data at the URL.
14-
/// Sends the data or the error.
13+
/// Read the data at the URL, sending the result or an error.
1514
public class func rex_dataWithContentsOfURL(url: NSURL, options: NSDataReadingOptions = NSDataReadingOptions()) -> SignalProducer<NSData, NSError> {
1615
return SignalProducer<NSData, NSError> { observer, disposable in
1716
do {

Source/Property.swift

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,27 +9,33 @@
99
import ReactiveCocoa
1010

1111
extension PropertyType where Value == Bool {
12+
/// The conjunction of `self` and `other`.
1213
public func and<P: PropertyType where P.Value == Bool>(other: P) -> AndProperty {
1314
return AndProperty(terms: [AnyProperty(self), AnyProperty(other)])
1415
}
1516

17+
/// The conjunction of `self` and `other`.
1618
public func and(other: AnyProperty<Bool>) -> AndProperty {
1719
return AndProperty(terms: [AnyProperty(self), other])
1820
}
1921

22+
/// The disjunction of `self` and `other`.
2023
public func or<P: PropertyType where P.Value == Bool>(other: P) -> OrProperty {
2124
return OrProperty(terms: [AnyProperty(self), AnyProperty(other)])
2225
}
2326

27+
/// The disjunction of `self` and `other`.
2428
public func or(other: AnyProperty<Bool>) -> OrProperty {
2529
return OrProperty(terms: [AnyProperty(self), other])
2630
}
2731

32+
/// A negated property of `self`.
2833
public func not() -> NotProperty {
2934
return NotProperty(source: AnyProperty(self), invert: true)
3035
}
3136
}
3237

38+
/// Specialized `PropertyType` for the conjuction of a set of boolean properties.
3339
public struct AndProperty: PropertyType {
3440
public let terms: [AnyProperty<Bool>]
3541

@@ -44,10 +50,12 @@ public struct AndProperty: PropertyType {
4450
}
4551
}
4652

53+
/// Creates a new property with an additional conjunctive term.
4754
public func and<P : PropertyType where P.Value == Bool>(other: P) -> AndProperty {
4855
return AndProperty(terms: terms + [AnyProperty(other)])
4956
}
5057

58+
/// Creates a new property with an additional conjunctive term.
5159
public func and(other: AnyProperty<Bool>) -> AndProperty {
5260
return AndProperty(terms: terms + [other])
5361
}
@@ -57,6 +65,7 @@ public struct AndProperty: PropertyType {
5765
}
5866
}
5967

68+
/// Specialized `PropertyType` for the disjunction of a set of boolean properties.
6069
public struct OrProperty: PropertyType {
6170
public let terms: [AnyProperty<Bool>]
6271

@@ -71,10 +80,12 @@ public struct OrProperty: PropertyType {
7180
}
7281
}
7382

83+
/// Creates a new property with an additional disjunctive term.
7484
public func or<P : PropertyType where P.Value == Bool>(other: P) -> OrProperty {
7585
return OrProperty(terms: terms + [AnyProperty(other)])
7686
}
7787

88+
/// Creates a new property with an additional disjunctive term.
7889
public func or(other: AnyProperty<Bool>) -> OrProperty {
7990
return OrProperty(terms: terms + [other])
8091
}
@@ -84,6 +95,7 @@ public struct OrProperty: PropertyType {
8495
}
8596
}
8697

98+
/// Specialized `PropertyType` for the negation of a boolean property.
8799
public struct NotProperty: PropertyType {
88100
private let source: AnyProperty<Bool>
89101
private let invert: Bool
@@ -96,6 +108,7 @@ public struct NotProperty: PropertyType {
96108
return source.producer.map { $0 != self.invert }
97109
}
98110

111+
/// A negated property of `self`.
99112
public func not() -> NotProperty {
100113
return NotProperty(source: source, invert: !invert)
101114
}

Source/UIKit/UILabel.swift

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,8 @@ extension UILabel {
1414
public var rex_text: MutableProperty<String> {
1515
return associatedProperty(self, keyPath: "text")
1616
}
17-
17+
18+
/// Wraps a label's `textColor` value in a bindable property.
1819
public var rex_textColor: MutableProperty<UIColor> {
1920
return associatedProperty(self, key: &textColor, initial: { $0.textColor }, setter: { $0.textColor = $1 })
2021
}

0 commit comments

Comments
 (0)