lib/proforma/modeling/banner.rb in proforma-1.0.0 vs lib/proforma/modeling/banner.rb in proforma-1.0.1
- old
+ new
@@ -49,12 +49,14 @@
def image_width
@image_width ? @image_width.to_f : nil
end
def compile(data, evaluator)
+ resolved_image = image.to_s.empty? ? nil : evaluator.value(data, image)
+
self.class.new(
details: evaluator.text(data, details),
- image: evaluator.value(data, image),
+ image: resolved_image,
image_height: image_height,
image_width: image_width,
title: evaluator.text(data, title)
)
end