lib/swagger_yard/property.rb in swagger_yard-0.1.0 vs lib/swagger_yard/property.rb in swagger_yard-0.2.0
- old
+ new
@@ -26,11 +26,11 @@
def model_name
@type.model_name
end
def to_h
- result = @type.to_h
- result["description"] = description if description
- result
+ @type.to_h.tap do |h|
+ h["description"] = description if description
+ end
end
end
end