lib/saorin/response.rb in saorin-0.1.3 vs lib/saorin/response.rb in saorin-0.1.4

- old
+ new

@@ -16,10 +16,10 @@ def error? !!@error end def valid? - return false unless (@result || @error) && !(@result && @error) + return false unless !(@result && @error) return false unless [String].any? { |type| @version.is_a? type } return false unless [String, NilClass].any? { |type| @result.is_a? type } return false unless [Saorin::Error, Hash, NilClass].any? { |type| @error.is_a? type } return false unless [String, Numeric, NilClass].any? { |type| @id.is_a? type } return false unless @version == JSON_RPC_VERSION