doc/ex/implode.rb in rmagick-2.13.4 vs doc/ex/implode.rb in rmagick-2.14.0

- old
+ new

@@ -1,8 +1,8 @@ -#! /usr/local/bin/ruby -w +#!/usr/bin/env ruby -w -require 'RMagick' +require 'rmagick' img = Magick::Image.read('images/Flower_Hat.jpg').first legend = Magick::Draw.new legend.stroke = 'transparent' @@ -10,25 +10,25 @@ legend.gravity = Magick::SouthGravity frames = Magick::ImageList.new implosion = 0.25 -8.times { - frames << img.implode(implosion) - legend.annotate(frames, 0,0,10,20, sprintf("% 4.2f", implosion)) - frames.matte = false - implosion -= 0.10 - } +8.times do + frames << img.implode(implosion) + legend.annotate(frames, 0,0,10,20, sprintf('% 4.2f', implosion)) + frames.matte = false + implosion -= 0.10 +end -7.times { - implosion += 0.10 - frames << img.implode(implosion) - legend.annotate(frames, 0,0,10,20, sprintf("% 4.2f", implosion)) - frames.matte = false - } +7.times do + implosion += 0.10 + frames << img.implode(implosion) + legend.annotate(frames, 0,0,10,20, sprintf('% 4.2f', implosion)) + frames.matte = false +end frames.delay = 10 frames.iterations = 0 -puts "Producing animation..." +puts 'Producing animation...' -frames.write("implode.gif") +frames.write('implode.gif') exit