aboutsummaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authorGravatar Muxi Yan <mxyan@google.com>2017-03-10 15:02:28 -0800
committerGravatar Muxi Yan <mxyan@google.com>2017-03-10 15:02:28 -0800
commit01bbf87bf78d40c9a8287fccf7ea0d64ff5cf07c (patch)
tree2549aef750b612efec425178ed87fa1fc59f1d31
parent44e1837ef914b6ad4133a3eaf38761ca37d9ae83 (diff)
Add comments for map function
-rw-r--r--src/objective-c/RxLibrary/GRXImmediateSingleWriter.m4
1 files changed, 4 insertions, 0 deletions
diff --git a/src/objective-c/RxLibrary/GRXImmediateSingleWriter.m b/src/objective-c/RxLibrary/GRXImmediateSingleWriter.m
index a0d3b771e8..a3e9cd60a3 100644
--- a/src/objective-c/RxLibrary/GRXImmediateSingleWriter.m
+++ b/src/objective-c/RxLibrary/GRXImmediateSingleWriter.m
@@ -75,7 +75,11 @@
return;
}
+// Overrides [requestWriter(Transformations):map:] for Protocol Buffers
+// encoding.
- (GRXWriter *)map:(id (^)(id))map {
+ // Since _value is available when creating the object, we can simply
+ // apply the map and store the output.
_value = map(_value);
return self;
}