# ----------------------------------------------------------------------- # Copyright © 2012 ShepHertz Technologies Pvt Ltd. All rights reserved. # ----------------------------------------------------------------------- require 'email/Email.rb' # # An enum that contains 2 types of the EmailMIME either text/plain or # text/html. # module App42 module Email class EmailMIME < App42Response unless (const_defined?(:PLAIN_TEXT_MIME_TYPE)) PLAIN_TEXT_MIME_TYPE = "text/plain" end unless (const_defined?(:HTML_TEXT_MIME_TYPE)) HTML_TEXT_MIME_TYPE = "text/html" end # # Sets the value of the EmailMIME. text/plain or text/html. # # @param string # - the string of EmailMIME either text/plain or text/html. # def enum(string) return EmailMIME.const_get(string) end # # Returns the value of the EmailMIME. text/plain or text/html. # # @return the value of EmailMIME. # # def isAvailable(string) if(string == "text/plain") return "PLAIN_TEXT_MIME_TYPE" elsif(string == "text/html") return "HTML_TEXT_MIME_TYPE"; else return nil end end end end end