Created
March 13, 2013 06:16
-
-
Save yswallow/5149740 to your computer and use it in GitHub Desktop.
_人人人人人人人人_
> 突然のやる気 <
 ̄Y^Y^Y^Y^Y^Y^Y^Y ̄
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
#coding: UTF-8 | |
module Totsuzen | |
def totsuzen(str = "突然の死") | |
str_length = 0 | |
str.each_char do |c| | |
str_length += (c.bytesize > 1) ? 2 : 1 | |
end | |
str_length /= 2 | |
result = "_人#{ "人" * str_length }人_\n" | |
result << "> #{str} <\n" | |
result << " ̄Y^#{ "Y^" * str_length }Y ̄\n" | |
return result | |
end | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment