Class: ElasticEmail::EncodingType
- Inherits:
-
Object
- Object
- ElasticEmail::EncodingType
- Defined in:
- lib/ElasticEmail/models/encoding_type.rb
Constant Summary collapse
- USER_PROVIDED =
"UserProvided".freeze
- NONE =
"None".freeze
- RAW7BIT =
"Raw7bit".freeze
- RAW8BIT =
"Raw8bit".freeze
- QUOTED_PRINTABLE =
"QuotedPrintable".freeze
- BASE64 =
"Base64".freeze
- UUE =
"Uue".freeze
Class Method Summary collapse
- .all_vars ⇒ Object
-
.build_from_hash(value) ⇒ String
Builds the enum from string.
Instance Method Summary collapse
-
#build_from_hash(value) ⇒ String
Builds the enum from string.
Class Method Details
.all_vars ⇒ Object
26 27 28 |
# File 'lib/ElasticEmail/models/encoding_type.rb', line 26 def self.all_vars @all_vars ||= [USER_PROVIDED, NONE, RAW7BIT, RAW8BIT, QUOTED_PRINTABLE, BASE64, UUE].freeze end |
.build_from_hash(value) ⇒ String
Builds the enum from string
33 34 35 |
# File 'lib/ElasticEmail/models/encoding_type.rb', line 33 def self.build_from_hash(value) new.build_from_hash(value) end |
Instance Method Details
#build_from_hash(value) ⇒ String
Builds the enum from string
40 41 42 43 |
# File 'lib/ElasticEmail/models/encoding_type.rb', line 40 def build_from_hash(value) return value if EncodingType.all_vars.include?(value) raise "Invalid ENUM value #{value} for class #EncodingType" end |