Created
November 20, 2014 08:56
-
-
Save moznion/e71683434a55863a8f96 to your computer and use it in GitHub Desktop.
This file contains hidden or 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
orig_program_name = $0 | |
(1..100).each do |i| | |
# do something | |
sleep 0.1 | |
# ここでプログラム名上書きして進捗を追加 | |
$0 = "#{orig_program_name}(#{i}%)" | |
end |
This file contains hidden or 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
(1..100).each do |i| | |
# do something | |
sleep 0.1 | |
# ここで進捗を表示 | |
puts "#{i}%" | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment