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 CHANGED
@@ -1,15 +1,15 @@
1
1
  ---
2
2
  !binary "U0hBMQ==":
3
3
  metadata.gz: !binary |-
4
- MDViNjIxNWEzZjM2N2RkZjM4ODRkZjljODgxNmI2ODlkZjVjMmM1MA==
4
+ ZTk1NjBiMTg0MjFjMTNjM2IzMTEyNDNiYmRkMTZkNDFlMjY3OGQ2ZQ==
5
5
  data.tar.gz: !binary |-
6
- MTkwYzViNzdlNmUwYWIyODEwODkyNTI5ZDY3ZTJkMmFmYzAyMTQxMQ==
6
+ MTIyYzk5YjE1MmVjOTE5YjI5NzI0OWUyNmQ3OGFjMTA4MDUxYTQzOQ==
7
7
  SHA512:
8
8
  metadata.gz: !binary |-
9
- NjViYjlmNTFmMjJjMTY0YzI5MGQzMDUxMjdjNzQ2NTc1MTczZWNiMjNlNjY4
10
- ZDljODk0ZTUwODRmNDIzNGUyZWY3YWZlMGJlNGI0Y2U1ODMzYjJiN2JkMjUy
11
- NTI1NWQ5MjExYmNiZWE5NzEzODhkZTg5NzFmNWZjMWE5Yjk3Njc=
9
+ OTk2YzFhZTEyYjdkNjM4Nzc4N2NmMTAyMDcwZjQ3MTQyNzM2MDI5ODY0ZTY5
10
+ NjkyYjc1YjY0MzMyZWJiOTFmODc4MzQxMTRkNjE4Njg4YzgyY2RkMWFmM2Ix
11
+ MGM0YWVmOWNhZTRjM2EyOGQyY2FmODEwMTcyNGY0MGYxZWJjOTY=
12
12
  data.tar.gz: !binary |-
13
- NDk4MmMxNDg5NjMwZjRhOTYzYWJmMjI1NDA2MmI5MjcxZmQ2ZWJmNzI5MGM1
14
- NmY4YmRkNzkyNjY1NmExMWI1MGFhZjRmMDIwYjU3Y2FiNzk2OGMwMDk3MTc0
15
- YjM0NGJiYTEwMTY1M2RhNTExMGQ3NmI5MDhiOWQyNTk0MTA4NGQ=
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
- @current_state = state
14
- add_state(state)
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, {})
@@ -1,4 +1,4 @@
1
1
  module Bstard
2
- VERSION = '0.2.0'
2
+ VERSION = '0.2.1'
3
3
  end
4
4
 
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: bstard
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.2.0
4
+ version: 0.2.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Tony Headford