simplestate 0.3.0 → 0.3.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/README.md +2 -2
- data/lib/simplestate/version.rb +1 -1
- metadata +1 -1
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA1:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 9fdb020f0abef3fdccbc30bf720dbc35047ffd14
|
|
4
|
+
data.tar.gz: 0304e8b3a88cbf05244332fe05b291a5f411b0f4
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 29d884b9ab06f2a216695e9e8750f241954423f005a2a1cad82fdec60c783484905c49c99aec30f2418c35a513303166479cbe59bec862c801970512ca45783f
|
|
7
|
+
data.tar.gz: a2a05dcb6a56e3309137a8ccd93124d08cf52135baba0760eb0a491de3475e2052e66208f124ae91a7744d496704c25eb691eea31e98b18669f90bad06a43cd0
|
data/README.md
CHANGED
|
@@ -87,7 +87,7 @@ A state has access to methods on the state holder via #holder:
|
|
|
87
87
|
holder.a_special_holder_method
|
|
88
88
|
```
|
|
89
89
|
|
|
90
|
-
|
|
90
|
+
### version 0.3.0 addition
|
|
91
91
|
A state has a *previous_states* method that returns an array of the states through which the state holder has transitioned to reach that state. Currently that array size is limited to 1. Old entries are dropped as new entries are added. DO NOT rely on that size limit. The last item in the list will be the most recent previous state. This is a public method on a state so it can be used via the state holder:
|
|
92
92
|
|
|
93
93
|
```ruby
|
|
@@ -109,7 +109,7 @@ end
|
|
|
109
109
|
|
|
110
110
|
Please note that State#previous_state_class does not have to agree with previous_states.last.class. #previous_state_class is set arbitrarily at instance creation. #previous_states is updated automatically at each state transition. #previous_state_class will be removed at some point in the future.
|
|
111
111
|
|
|
112
|
-
|
|
112
|
+
### usage example
|
|
113
113
|
The button module provides an example of the usage of Simplestate. Tests of this are provided in simplestate_test.rb.
|
|
114
114
|
|
|
115
115
|
## Development
|
data/lib/simplestate/version.rb
CHANGED