smcr
smcr
State Machine for Crystal
Installation
-
Add the dependency to your
shard.yml
:dependencies: smcr: github: drhuffman12/smcr
-
Run
shards install
Usage
For the states, we use Enums, which are importable from JSON. You might think that we should use Symbols, but those are NOT JSON import-able! See: https://forum.crystal-lang.org/t/how-to-do-from-json-with-symbol-variables/3379/2 .
require "smcr"
TODO: Write usage instructions here
Development
To enable debug comment logging, set CRYSTAL_DEBUG
env variable to anything other than an empty string. For example:
# debug logging enabled
CRYSTAL_DEBUG=soME_nOn_Blank_VALue crystal spec
# debug logging disabled
CRYSTAL_DEBUG= crystal spec
This will show at least:
Smcr::VERSION # => "0.1.0"
Use this to output additional debug info like:
p! Smcr::VERSION if Smcr::DEBUG_ENABLED
Contributing
- Fork it (https://github.com/drhuffman12/smcr/fork)
- Create your feature branch (
git checkout -b my-new-feature
) - Commit your changes (
git commit -am 'Add some feature'
) - Push to the branch (
git push origin my-new-feature
) - Create a new Pull Request
Contributors
- Daniel Huffman - creator and maintainer
Repository
smcr
Owner
Statistic
- 1
- 0
- 2
- 0
- 3
- over 3 years ago
- June 12, 2021
License
MIT License
Links
Synced at
Fri, 22 Nov 2024 04:10:44 GMT
Languages