lib/vacuum/response.rb in vacuum-4.0.0 vs lib/vacuum/response.rb in vacuum-4.1.0
- old
+ new
@@ -33,10 +33,10 @@
# Parses the response body
#
# @note Delegates to {#to_h} if no custom parser is set
def parse
- parser ? parser.parse(body) : to_h
+ parser&.parse(body) || to_h
end
# Casts body to Hash
#
# @return [Hash]