lib/padrino-mailer/mime.rb in padrino-mailer-0.11.3 vs lib/padrino-mailer/mime.rb in padrino-mailer-0.11.4
- old
+ new
@@ -1,15 +1,15 @@
module Padrino
module Mailer
-
+ ##
# Handles MIME type declarations for mail delivery.
#
module Mime
-
+ ##
# Returns Symbol with mime type if found, otherwise use +fallback+.
# +mime+ should be the content type like "text/plain"
- # +fallback+ may be any symbol
+ # +fallback+ may be any symbol.
#
# Also see the documentation for {MIME_TYPES}.
#
# @param [String] mime
# The mime alias to fetch (i.e 'text/plain').
@@ -28,10 +28,11 @@
#
def self.mime_type(mime, fallback=:plain)
MIME_TYPES.fetch(mime.to_s.downcase, fallback)
end
+ ##
# List of common mime-types, selected from various sources
# according to their usefulness for an email scope.
#
# You can add your own mime types like:
#
@@ -40,8 +41,8 @@
MIME_TYPES = {
"text/html" => :html,
"text/plain" => :plain,
"text/xml" => :xml
}
- end # Mime
- end # Mailer
-end # Padrino
+ end
+ end
+end