state_machines 0.1.2 → 0.1.3

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: 65309f4d9983b6dccdc1b0b166250118764346dd
4
- data.tar.gz: 6a47d10426af28dc338a77b731396c06fab6c84a
3
+ metadata.gz: f4408b8e84e9ed5e15d4c26a98acd7190a6e5a66
4
+ data.tar.gz: 47f30c2fda4189ab81c1c1dca43774a2e0d56965
5
5
  SHA512:
6
- metadata.gz: 10077a16141c29c4a6af5e8caf8a17b5e5548ab5138a70b7bb387970f4f8d6361a4f6a8ef8d9e1217aaa2cc783951ca52ec39b798e78077fe7ece8790bfcd19d
7
- data.tar.gz: 457e4419ab4037322ce5b5d06e8dcbb6111a4874cfe4d5927dfd48948be2ed778ae5a83a1768dab3c15762402c1c8758a89ede19fdb061724533555bcea1c00c
6
+ metadata.gz: ca98c4bbd71a2a351ba3f3b6f70951a70ac0148dfa019eae76cb99083d2f4a02afe967f0464ec8bceaf92defb59f5512681f1ae95a177dd6707742b68cf055f0
7
+ data.tar.gz: ddf52356a4ef5738bd7a27dfd6d61f95f3e72f38f3ee60a70202706eb2a3bdcbf526954682addb9f42dec6fa57b75ba406521cf49c25a77937e18cca8999a39f
@@ -24,13 +24,13 @@ module StateMachines
24
24
  def initialize_states(object, options = {})
25
25
  options.assert_valid_keys( :static, :dynamic, :to)
26
26
  options = {:static => true, :dynamic => true}.merge(options)
27
-
27
+
28
+ result = yield if block_given?
29
+
28
30
  each_value do |machine|
29
31
  machine.initialize_state(object, :force => options[:static] == :force, :to => options[:to]) unless machine.dynamic_initial_state?
30
32
  end if options[:static]
31
33
 
32
- result = yield if block_given?
33
-
34
34
  each_value do |machine|
35
35
  machine.initialize_state(object, :force => options[:dynamic] == :force, :to => options[:to]) if machine.dynamic_initial_state?
36
36
  end if options[:dynamic]
@@ -1,3 +1,3 @@
1
1
  module StateMachines
2
- VERSION = '0.1.2'
2
+ VERSION = '0.1.3'
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: state_machines
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.2
4
+ version: 0.1.3
5
5
  platform: ruby
6
6
  authors:
7
7
  - Abdelkader Boudih
@@ -9,7 +9,7 @@ authors:
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2015-01-20 00:00:00.000000000 Z
12
+ date: 2015-01-21 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: bundler