lib/shoes/swt/image.rb in shoes-swt-4.0.0.pre5 vs lib/shoes/swt/image.rb in shoes-swt-4.0.0.pre6
- old
+ new
@@ -87,14 +87,14 @@
dsl.element_width = @saved_width
dsl.element_height = @saved_height
end
def display_image(name_or_data)
- if raw_image_data?(name_or_data)
- data = load_raw_image_data(name_or_data)
- else
- data = name_or_data
- end
+ data = if raw_image_data?(name_or_data)
+ load_raw_image_data(name_or_data)
+ else
+ name_or_data
+ end
create_image(data)
end
def raw_image_data?(name_or_data)
@dsl.raw_image_data?(name_or_data)