Class: Zyphr::WorkflowStepType
- Inherits:
-
Object
- Object
- Zyphr::WorkflowStepType
- Defined in:
- lib/zyphr/models/workflow_step_type.rb
Constant Summary collapse
- EMAIL =
"email".freeze
- PUSH =
"push".freeze
- SMS =
"sms".freeze
- IN_APP =
"in_app".freeze
- SLACK =
"slack".freeze
- DISCORD =
"discord".freeze
- TEAMS =
"teams".freeze
- DELAY =
"delay".freeze
- BRANCH =
"branch".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
28 29 30 |
# File 'lib/zyphr/models/workflow_step_type.rb', line 28 def self.all_vars @all_vars ||= [EMAIL, PUSH, SMS, IN_APP, SLACK, DISCORD, TEAMS, DELAY, BRANCH].freeze end |
.build_from_hash(value) ⇒ String
Builds the enum from string
35 36 37 |
# File 'lib/zyphr/models/workflow_step_type.rb', line 35 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
42 43 44 45 |
# File 'lib/zyphr/models/workflow_step_type.rb', line 42 def build_from_hash(value) return value if WorkflowStepType.all_vars.include?(value) raise "Invalid ENUM value #{value} for class #WorkflowStepType" end |