README.md in mutator-0.0.1 vs README.md in mutator-0.0.2
- old
+ new
@@ -1,8 +1,8 @@
-# Yet another state machine
+# Mutator
-Ya, this is another state machine gem. Why? Well, among the major state machine gems I found, they didn't quite do what I was looking for. So I wrote my own. Plus, reinventing the wheel is fun!
+Yes, this is another state machine gem. Why? Well, among the major state machine gems I found, they didn't quite do what I was looking for. So I wrote my own. Plus, reinventing the wheel is fun!
## Installation
Add this line to your application's Gemfile:
@@ -105,9 +105,20 @@
end
end
```
Now you can always use `machine.deliver!` to do the transition to delivered.
+
+### Where are my scopes?
+
+Way back at the beginning when we included `Mutator::Helpers`, that defined class methods on `Wonder` for each invoice.
+
+``` ruby
+Wonder.machine.states #=> [:signed, :sealed, :delivered, :yours]
+Wonder.signed #=> Wonder.where(state: :signed)
+Wonder.sealed #=> Wonder.where(state: :sealed)
+[...]
+```
### That's all folks!
That's more or less it. You may or may not like the way I've done this state machine, but it works for the purposes I need it for. I'm happy to discuss changes or reasoning behind certain things. There isn't a ton of code so feel free to poke around!