bstard 0.2.0 → 0.2.1
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 +5 -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
|
+
ZTk1NjBiMTg0MjFjMTNjM2IzMTEyNDNiYmRkMTZkNDFlMjY3OGQ2ZQ==
|
5
5
|
data.tar.gz: !binary |-
|
6
|
-
|
6
|
+
MTIyYzk5YjE1MmVjOTE5YjI5NzI0OWUyNmQ3OGFjMTA4MDUxYTQzOQ==
|
7
7
|
SHA512:
|
8
8
|
metadata.gz: !binary |-
|
9
|
-
|
10
|
-
|
11
|
-
|
9
|
+
OTk2YzFhZTEyYjdkNjM4Nzc4N2NmMTAyMDcwZjQ3MTQyNzM2MDI5ODY0ZTY5
|
10
|
+
NjkyYjc1YjY0MzMyZWJiOTFmODc4MzQxMTRkNjE4Njg4YzgyY2RkMWFmM2Ix
|
11
|
+
MGM0YWVmOWNhZTRjM2EyOGQyY2FmODEwMTcyNGY0MGYxZWJjOTY=
|
12
12
|
data.tar.gz: !binary |-
|
13
|
-
|
14
|
-
|
15
|
-
|
13
|
+
MGM0NjE4YzU4MWU1ZDNiYTA3ZWI5YTZjMDZhMTQ0NzM5YjQ2ZjM1NTJiNDQ2
|
14
|
+
MTE4ZmUzOGRjYmRhNWMzMDQ0OTQxZWQxNWRiYjc1ZGZiYmY2MzEwNjZjMTM1
|
15
|
+
YjM3ODEwZThmMWI4MDBhYTQ4ODI2ZDZiYzRmYzFiZDA2NGM0OTY=
|
data/lib/bstard/fsm.rb
CHANGED
@@ -10,10 +10,12 @@ class Bstard::Fsm
|
|
10
10
|
end
|
11
11
|
|
12
12
|
def initial(state)
|
13
|
-
|
14
|
-
|
13
|
+
unless state.nil?
|
14
|
+
@current_state = state
|
15
|
+
add_state(state)
|
16
|
+
end
|
15
17
|
end
|
16
|
-
|
18
|
+
|
17
19
|
def event(event_name, transitions)
|
18
20
|
evt = event_name.to_sym
|
19
21
|
t = @events.fetch(evt, {})
|
data/lib/bstard/version.rb
CHANGED