bstard 0.2.2 → 0.2.3
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +8 -8
- data/lib/bstard/fsm.rb +3 -3
- data/lib/bstard/version.rb +1 -1
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,15 +1,15 @@
|
|
1
1
|
---
|
2
2
|
!binary "U0hBMQ==":
|
3
3
|
metadata.gz: !binary |-
|
4
|
-
|
4
|
+
MjRmN2FjOTNjZjJkOWI0NDcxMzU3MTNjZDkxMmM0MGQyMTliZTc1ZQ==
|
5
5
|
data.tar.gz: !binary |-
|
6
|
-
|
6
|
+
NTNhZjk0MDJjNDk2YjE5ZGNjZmE3MTdmMGVkZmU0Zjg3NDk2NTE0Zg==
|
7
7
|
SHA512:
|
8
8
|
metadata.gz: !binary |-
|
9
|
-
|
10
|
-
|
11
|
-
|
9
|
+
NDY4MzExMjVhMTBiYjM4Nzc5MzY2YzUxODMwY2E0NTcxMTA4NjJkNDg5YWU3
|
10
|
+
MTdjNmY5NTMzYzg4NmU4MDUyYWVmZmM0ZWNjZTVlYWUyNTgxMDlmMzEwM2Zj
|
11
|
+
NGY3YjdjYmUzZjIyMjVkZGFjNTJlZjRjNmY0MDljZDlkMWIxZDM=
|
12
12
|
data.tar.gz: !binary |-
|
13
|
-
|
14
|
-
|
15
|
-
|
13
|
+
MGYyZjIzYWE3ODA0MDdiYmI4NzRhOTFhNmNiMTRkZDVkMmEwNzU3OGY3YmQx
|
14
|
+
Y2U5OTdlOTQ1Y2YzNmU1YmM5ZWNjNTRlNjM4ODhhOTk1YTRmNjExMWFiNWEx
|
15
|
+
ZDdjZDVhOGQ3OGQyZjljOTIwNTgzZGZhODJkNDg5ODUwM2Y0OWE=
|
data/lib/bstard/fsm.rb
CHANGED
@@ -11,8 +11,8 @@ class Bstard::Fsm
|
|
11
11
|
|
12
12
|
def initial(state)
|
13
13
|
unless state.nil?
|
14
|
-
@current_state = state
|
15
|
-
add_state(
|
14
|
+
@current_state = state.to_sym
|
15
|
+
add_state(current_state)
|
16
16
|
end
|
17
17
|
end
|
18
18
|
|
@@ -20,7 +20,7 @@ class Bstard::Fsm
|
|
20
20
|
evt = event_name.to_sym
|
21
21
|
t = @events.fetch(evt, {})
|
22
22
|
@events[evt] = t.merge(transitions)
|
23
|
-
transitions.each { |k,v| add_state(k); add_state(v) }
|
23
|
+
transitions.each { |k,v| add_state(k.to_sym); add_state(v.to_sym) }
|
24
24
|
add_event_method(evt)
|
25
25
|
add_can_event_method(evt)
|
26
26
|
end
|
data/lib/bstard/version.rb
CHANGED