Module | TMail::StrategyInterface |
In: |
lib/tmail/encode.rb
|
# File lib/tmail/encode.rb, line 45 def accept_strategy(klass, eol, charset, dest = nil) dest ||= '' accept klass.new(create_dest(dest), charset, eol) dest end
# File lib/tmail/encode.rb, line 21 def create_dest(obj) case obj when nil StringOutput.new when String StringOutput.new(obj) when IO, StringOutput obj else raise TypeError, 'cannot handle this type of object for dest' end end
# File lib/tmail/encode.rb, line 39 def decoded(eol = "\n", charset = 'e', dest = nil) accept_strategy Decoder, eol, charset, dest end