# Bravery: My Micro State Machine Library for Ruby.

Source: https://rickcarlino.com/2013/bravery-a-mico-state-machine-library-for-ruby.html
Published: 2013-12-22
Archived: this article may be out of date.

I needed a dirt simple state machine that was flexible enough to meet the needs
of some very 'edge' requirements in a project I recently worked on. I found that
most of
[the Ruby state machines out there](https://www.ruby-toolbox.com/categories/state_machines)
were making too many assumptions for the level of flexibility I needed. This
weekend I wrote a small gem called [Bravery](https://rubygems.org/gems/bravery).

It's only ~55 lines of Ruby and it:

- Tracks object state
- Handles user-defined callback / validation behavior when entering a state
- Absolutely nothing else (and that's a good thing!)

Check it out on [Github](https://github.com/rickcarlino/bravery).
