Last active
December 10, 2015 18:48
-
-
Save asonas/4476547 to your computer and use it in GitHub Desktop.
リファクタリングお願いします。
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# encoding: utf-8 | |
require "prime" | |
script = %w( | |
おちつけ.... | |
心を平静にして考えるんだ... | |
こんなときどうするか... | |
prime | |
落ち着くんだ | |
「素数」を数えて落ち着くんだ | |
) | |
script.each do |selif| | |
if selif == "prime" | |
Prime.take_while{ |n| n < 20 }.each do |n| | |
puts n | |
sleep 0.4 | |
end | |
else | |
p selif | |
end | |
sleep 1 | |
end |
Author
asonas
commented
Jan 9, 2013
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment