Module: CharlockHolmes::Converter
Instance Method Summary collapse
Instance Method Details
#convert(string, from, to) ⇒ Object
5 6 7 8 9 10 |
# File 'lib/charlock_holmes/converter.rb', line 5 def convert(string, from, to) raise TypeError.new("string cannot be nil") unless string raise TypeError.new("from cannot be nil") unless from raise TypeError.new("to cannot be nil") unless to string.encode(to, from) end |