reactive-ruby 0.7.24 → 0.7.25

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 547919552a1ae42fb64e13f1cb6b33a930143d55
4
- data.tar.gz: 92a3b2a9dedb1c2eb9e91735bb4c29431e24a88e
3
+ metadata.gz: de348153ef3143a695778ae38f71ab3282402a13
4
+ data.tar.gz: 3113b14b3394988d09b200057c893e1e1effaaf0
5
5
  SHA512:
6
- metadata.gz: acd13c0b42bbcc589bb8ed30881777f50ca537ecf7d89fdbf214019628f42f7806597c6aac933f4aa5f0b873f3055563e452a04d50ea7a0eb8179795a43a98c7
7
- data.tar.gz: 0442a98972896cc22c2b9632f67cbfd71ec336a72d1e589bfa09d53a05fdd4ca3335f7365718db5a7a8830e2cb70cc074b2c3a20b336314736cea2bb9f766aa2
6
+ metadata.gz: a498ef58657f9adba73020225353168ca8ce45e5bfae520c74f0ad0c7daa5d959a38e69e47193925abf8052cc3894c202963cd966cee4c62cf9339cc77d8f4ee
7
+ data.tar.gz: fd08e5a0b645aec16359f31d760c2a4ef914a7761ca31bee14c784d836dbe67c4f0da9290931f1e8c560b7d62d75c7278c2bfc6aa33eb6e44723536c1e4b540f
@@ -401,9 +401,8 @@ module React
401
401
  yield name, React::State.get_state(from || self, name), current_state if block and block.arity > 0
402
402
  React::State.set_state(from || self, name, current_state)
403
403
  React::Observable.new(current_state) do |update|
404
- current_state = React::State.get_state(from || self, name)
405
- yield name, current_state, update if block and block.arity > 0
406
- React::State.set_state(from || self, name, current_state)
404
+ yield name, React::State.get_state(from || self, name), update if block and block.arity > 0
405
+ React::State.set_state(from || self, name, update)
407
406
  end
408
407
  end
409
408
  end
@@ -1,5 +1,5 @@
1
1
  module React
2
-
2
+
3
3
  class Observable
4
4
 
5
5
  def initialize(value, on_change = nil, &block)
@@ -8,7 +8,7 @@ module React
8
8
  end
9
9
 
10
10
  def method_missing(method_sym, *args, &block)
11
- @value.send(method_sym, *args, &block).tap { |result| @on_change.call result }
11
+ @value.send(method_sym, *args, &block).tap { |result| @on_change.call @value }
12
12
  end
13
13
 
14
14
  def respond_to?(method, *args)
@@ -18,16 +18,16 @@ module React
18
18
  @value.respond_to? method, *args
19
19
  end
20
20
  end
21
-
21
+
22
22
  def call(new_value)
23
23
  @on_change.call new_value
24
24
  @value = new_value
25
25
  end
26
-
26
+
27
27
  def to_proc
28
28
  lambda { |arg = @value| @on_change.call arg }
29
29
  end
30
-
30
+
31
31
  end
32
-
33
- end
32
+
33
+ end
@@ -1,3 +1,3 @@
1
1
  module React
2
- VERSION = "0.7.24"
2
+ VERSION = "0.7.25"
3
3
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: reactive-ruby
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.7.24
4
+ version: 0.7.25
5
5
  platform: ruby
6
6
  authors:
7
7
  - David Chang
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2015-10-14 00:00:00.000000000 Z
11
+ date: 2015-10-15 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: opal