That Ruby looks excellent. I hadn't realized the contracts gem existed.
So much of what people redundantly cram into test suites could be handled with simple contracts.
So much of what people redundantly cram into test suites could be handled with simple contracts.
http://www.poodr.com/ goes in-depth about this.
[:quacks], [:barks] => Maybe[:flies]
Some Rubyists get pedantic about duck typing. It's just a tool to design good systems, not an article of faith.