lib/sanford-protocol/request.rb in sanford-protocol-0.4.0 vs lib/sanford-protocol/request.rb in sanford-protocol-0.4.1

- old
+ new

@@ -22,9 +22,11 @@ def valid? if !version [ false, "The request doesn't contain a version." ] elsif !name [ false, "The request doesn't contain a name." ] + elsif !params.kind_of?(Hash) + [ false, "The request's params are not a valid BSON document." ] else [ true ] end end