I have a situation where I'd like to be able to minify (not compile) a Ruby script. The goals are to:
- Reduce the overall character count of the script;
- Perform a degree of obfuscation to make it difficult for others to modify the code.
We can assume that:
- Yes, I know what I'm doing, and I really do want to minify and obfuscate the code.
- The source Ruby code has a simple syntax and doesn't use any advanced metaprogramming techniques or the like.
Is there any existing library or tool for this? If not, what would be the best way to get started to develop a simple minifier (ideally, also written in Ruby)?