Skip to content

Instantly share code, notes, and snippets.

@yswallow
Created March 13, 2013 06:16
Show Gist options
  • Save yswallow/5149740 to your computer and use it in GitHub Desktop.
Save yswallow/5149740 to your computer and use it in GitHub Desktop.
_人人人人人人人人_ > 突然のやる気 <  ̄Y^Y^Y^Y^Y^Y^Y^Y ̄
#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