representable
representable copied to clipboard
Teach #from_hash to raise TypeError when argument is not a Hash
@apotonick An alternative would be for #from_hash to fail silently (i.e. data = {} unless ::Hash === data). However, I think raising a TypeError makes more sense in a web application context. it allows the Operation or web framework Controller to rescue TypeError and return a 400 to the client.