Sha256: e2f4a57d96c49e04c4f1215e34996d042e075a16066423e7ad649570a68fff1c

Contents?: true

Size: 1.24 KB

Versions: 1

Compression:

Stored size: 1.24 KB

Contents

# -----------------------------------------------------------------------
#  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

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
App42_RUBY_SDK-0.8.3 lib/email/EmailMIME.rb