I've added a new free (online) book to the Yuki & Moto Press
Bookshelf . Let's welcome:
Programming Blockchains Step-by-Step from Scratch (Zero) in Ruby.
Starting with Crypto Hashes...  The contents includes:
- (Crypto) Hash
- (Crypto) Block
- (Crypto) Block with Proof-of-Work
- Blockchain Broken?
- Mining, Mining, Mining
- Bitcoin, Bitcoin, Bitcoin
- (Crypto) Block with Transactions (Tx)
- References / Links
Note: The manuscript source includes many single-file ruby script samples 
Happy mining and blockchaining with ruby. Cheers. Prost.
PS: Did you know? You can build online books and bookshelves with ruby -
use the jekyll machinery with octobook themes .