state_jacket 0.0.7 → 0.0.8
Sign up to get free protection for your applications and to get access to all the features.
- data/lib/state_jacket/catalog.rb +7 -2
- data/lib/state_jacket/version.rb +1 -1
- metadata +3 -4
data/lib/state_jacket/catalog.rb
CHANGED
@@ -5,7 +5,8 @@ module StateJacket
|
|
5
5
|
# A simple class that allows users to intuitively define states and transitions.
|
6
6
|
class Catalog < SimpleDelegator
|
7
7
|
def initialize
|
8
|
-
|
8
|
+
@inner_hash = {}
|
9
|
+
super inner_hash
|
9
10
|
end
|
10
11
|
|
11
12
|
def add(state)
|
@@ -52,13 +53,17 @@ module StateJacket
|
|
52
53
|
raise "Invalid StateJacket::Catalog! [#{value}] is not a first class state."
|
53
54
|
end
|
54
55
|
end
|
55
|
-
freeze
|
56
|
+
inner_hash.freeze
|
56
57
|
end
|
57
58
|
|
58
59
|
def supports_state?(state)
|
59
60
|
keys.include?(state.to_s)
|
60
61
|
end
|
61
62
|
|
63
|
+
protected
|
64
|
+
|
65
|
+
attr_reader :inner_hash
|
66
|
+
|
62
67
|
end
|
63
68
|
|
64
69
|
end
|
data/lib/state_jacket/version.rb
CHANGED
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: state_jacket
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0.
|
4
|
+
version: 0.0.8
|
5
5
|
prerelease:
|
6
6
|
platform: ruby
|
7
7
|
authors:
|
@@ -9,7 +9,7 @@ authors:
|
|
9
9
|
autorequire:
|
10
10
|
bindir: bin
|
11
11
|
cert_chain: []
|
12
|
-
date: 2013-
|
12
|
+
date: 2013-02-26 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: micro_test
|
@@ -99,10 +99,9 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
99
99
|
version: '0'
|
100
100
|
requirements: []
|
101
101
|
rubyforge_project:
|
102
|
-
rubygems_version: 1.8.
|
102
|
+
rubygems_version: 1.8.25
|
103
103
|
signing_key:
|
104
104
|
specification_version: 3
|
105
105
|
summary: Intuitively define state machine like states and transitions.
|
106
106
|
test_files:
|
107
107
|
- test/catalog_test.rb
|
108
|
-
has_rdoc:
|