lib/pricehubble/client/response/recursive_open_struct.rb in pricehubble-0.3.0 vs lib/pricehubble/client/response/recursive_open_struct.rb in pricehubble-0.4.0
- old
+ new
@@ -16,10 +16,10 @@
# Skip string bodies, they are unparsed or contain binary data
next if body.is_a? String
# By definition empty responses (HTTP status 204)
# or actual empty bodies should be an empty hash
- body = {} if res[:status] == 204 || res[:body].empty?
+ body = {} if res[:status] == 204 || res[:body].blank?
# Looks like we have some actual data we can wrap
res[:body] = \
::RecursiveOpenStruct.new(body, recurse_over_arrays: true)
end