Class: Lob::SelfMailerSize
- Inherits:
-
Object
- Object
- Lob::SelfMailerSize
- Defined in:
- lib/lob/models/self_mailer_size.rb
Constant Summary collapse
- N6X18_BIFOLD =
"6x18_bifold".freeze
- N11X9_BIFOLD =
"11x9_bifold".freeze
- N12X9_BIFOLD =
"12x9_bifold".freeze
- N17_75X9_TRIFOLD =
"17.75x9_trifold".freeze
Class Method Summary collapse
-
.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
.build_from_hash(value) ⇒ String
Builds the enum from string
26 27 28 |
# File 'lib/lob/models/self_mailer_size.rb', line 26 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
33 34 35 36 37 |
# File 'lib/lob/models/self_mailer_size.rb', line 33 def build_from_hash(value) constantValues = SelfMailerSize.constants.select { |c| SelfMailerSize::const_get(c) == value } raise "Invalid ENUM value #{value} for class #SelfMailerSize" if constantValues.empty? value end |