lib/flexirest/caching.rb in flexirest-1.9.15 vs lib/flexirest/caching.rb in flexirest-1.9.16
- old
+ new
@@ -108,12 +108,15 @@
return @result if @class_name.nil? # Old cached instance
if @result.is_a?(Array)
ri = ResultIterator.new(self)
ri.items = @result.map{|i| @class_name.constantize.new(i)}
+ ri._clean!
ri
else
- @class_name.constantize.new(@result)
+ obj = @class_name.constantize.new(@result)
+ obj._clean!
+ obj
end
end
end
end