motion-wiretap 1.1.8 → 1.1.9
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/README.md +1 -1
- data/lib/motion-wiretap/all/wiretap.rb +5 -4
- data/lib/motion-wiretap/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 44771a15f20f11873897710ebabf52e5852ab939
|
4
|
+
data.tar.gz: 83dc0e0574461141d0da85b2ef32932576779507
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 634c9d49b9a4e84b9e2270a6b87f1ebc29f3e72807b69fc2a2aed513d6446fc7c95be9ee0799f847c40af662912d7f6a4f8f7b119fd456848845de1620bddd8a
|
7
|
+
data.tar.gz: 5f77fe1f3e89b4437e095161a0296a7962bbeaf384357833479c77a092437901ddfb914f3b3f1c6c94d0673ac2487ac67db7bfd93a63d3da1b61b86771cad63e
|
data/README.md
CHANGED
@@ -183,7 +183,7 @@ person_2.name = 'Mr. Blue'
|
|
183
183
|
|
184
184
|
There is a "short form" and "long form" to these wiretaps. The "short form" is
|
185
185
|
something like `Motion.wiretap(proc) do (block) end`. The `proc` will be
|
186
|
-
executed, and when it's done, the
|
186
|
+
executed, and when it's done, the block will execute.
|
187
187
|
|
188
188
|
The "long form" is different only in that the block is passed to the `and_then`
|
189
189
|
method, not the initializer: `Motion.wiretap(proc).and_then do ... end`. In
|
@@ -358,7 +358,8 @@ module MotionWiretap
|
|
358
358
|
# implementation
|
359
359
|
def trigger_changed(*values)
|
360
360
|
if @filter.call(*values)
|
361
|
-
|
361
|
+
Wiretap.instance_method(:trigger_changed).bind(self).call(*values)
|
362
|
+
# super
|
362
363
|
end
|
363
364
|
end
|
364
365
|
|
@@ -374,7 +375,7 @@ module MotionWiretap
|
|
374
375
|
# passes the values through the combiner before passing up to the parent
|
375
376
|
# implementation
|
376
377
|
def trigger_changed(*values)
|
377
|
-
|
378
|
+
Wiretap.instance_method(:trigger_changed).bind(self).call(@combiner.call(*values))
|
378
379
|
end
|
379
380
|
|
380
381
|
end
|
@@ -390,7 +391,7 @@ module MotionWiretap
|
|
390
391
|
# passes each value through the @reducer, passing in the return value of the
|
391
392
|
# previous call (starting with @memo)
|
392
393
|
def trigger_changed(*values)
|
393
|
-
|
394
|
+
Wiretap.instance_method(:trigger_changed).bind(self).call(values.inject(@memo, &@reducer))
|
394
395
|
end
|
395
396
|
|
396
397
|
end
|
@@ -405,7 +406,7 @@ module MotionWiretap
|
|
405
406
|
# passes the values through the mapper before passing up to the parent
|
406
407
|
# implementation
|
407
408
|
def trigger_changed(*values)
|
408
|
-
|
409
|
+
Wiretap.instance_method(:trigger_changed).bind(self).call(*values.map { |value| @mapper.call(value) })
|
409
410
|
end
|
410
411
|
|
411
412
|
end
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: motion-wiretap
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.1.
|
4
|
+
version: 1.1.9
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Colin T.A. Gray
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2014-
|
11
|
+
date: 2014-07-09 00:00:00.000000000 Z
|
12
12
|
dependencies: []
|
13
13
|
description: |
|
14
14
|
ReactiveCocoa is an amazing system, and RubyMotion could benefit from the
|