lib/yamg/splash.rb in yamg-0.3.0 vs lib/yamg/splash.rb in yamg-0.3.1
- old
+ new
@@ -9,17 +9,17 @@
def initialize(src, size, background)
@src = src
@size = size
@bg = background
@assets = YAMG.load_images(src)
+ YAMG.puts_and_exit("No sources in '#{src}'") if assets.empty?
%w(bg background wallpaper).each do |i|
@wallpaper = assets.delete("#{i}.png")
end
if (center = assets.delete('center.png'))
@center = File.join(src, center)
end
@center ||= File.join(File.dirname(__FILE__), 'assets', 'dot.png')
- YAMG.puts_and_exit("No sources in '#{src}'") if assets.empty?
@img = MiniMagick::Image.open(@center)
end
#
# Center image