class Morsify
Public Instance Methods
call(str)
click to toggle source
# File lib/morsify.rb, line 4 def call(str) str.chars.map { |i| MORSE_CHARS.merge({ ' ' => ' '})[i.downcase] }.join(' ').strip end
# File lib/morsify.rb, line 4 def call(str) str.chars.map { |i| MORSE_CHARS.merge({ ' ' => ' '})[i.downcase] }.join(' ').strip end