# File lib/mail/body.rb, line 29 def initialize(string = '') @boundary = nil @preamble = nil @epilogue = nil @part_sort_order = [ "text/plain", "text/enriched", "text/html" ] @parts = Mail::PartsList.new if string.blank? @raw_source = '' else # Do join first incase we have been given an Array in Ruby 1.9 if string.respond_to?(:join) @raw_source = string.join('') elsif string.respond_to?(:to_s) @raw_source = string.to_s else raise "You can only assign a string or an object that responds_to? :join or :to_s to a body." end end @encoding = nil set_charset end