Skip to content

Instantly share code, notes, and snippets.

@ssig33
Created May 12, 2012 17:19
Show Gist options
  • Select an option

  • Save ssig33/2667713 to your computer and use it in GitHub Desktop.

Select an option

Save ssig33/2667713 to your computer and use it in GitHub Desktop.
http://www6.ocn.ne.jp/~miz2/morse.htm これとかと一緒に使う
#coding:utf-8
def decode_dip str
str.gsub(/ピカァッ/, '-').gsub(/ピカッ/, '・')
end
def encode_dip str
str.gsub(/-/, 'ピカァッ').gsub(/・/, 'ピカッ')
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment