instance method
type_param
Ruby on Rails 2.3.18
Since v2.2.3 Last seen in v2.3.18Available in: v2.2.3 v2.3.18
Signature
type_param( name, default = nil )
Returns the named type parameter as a string, from the “Content-Type:” header.
Example:
mail = TMail::Mail.new mail.type_param("charset") #=> nil mail.type_param("charset", []) #=> [] mail.set_content_type("text", "plain", {:charset => "EUC-KR", :format => "flowed"}) mail.type_param("charset") #=> "EUC-KR" mail.type_param("format") #=> "flowed"
Parameters
-
namereq -
defaultopt = nil
Source
# File actionmailer/lib/action_mailer/vendor/tmail-1.2.7/tmail/interface.rb, line 844
def type_param( name, default = nil )
if h = @header['content-type']
h[name] || default
else
default
end
end
Defined in actionmailer/lib/action_mailer/vendor/tmail-1.2.7/tmail/interface.rb line 844
· View on GitHub
· Improve this page
· Find usages on GitHub
Defined in TMail::Mail