Class: Floe::Workflow::Catcher
- Inherits:
-
Object
- Object
- Floe::Workflow::Catcher
- Includes:
- ValidationMixin, ErrorMatcherMixin
- Defined in:
- lib/floe/workflow/catcher.rb
Instance Attribute Summary collapse
-
#error_equals ⇒ Object
readonly
Returns the value of attribute error_equals.
-
#name ⇒ Object
readonly
Returns the value of attribute name.
-
#next ⇒ Object
readonly
Returns the value of attribute next.
-
#result_path ⇒ Object
readonly
Returns the value of attribute result_path.
Instance Method Summary collapse
-
#initialize(workflow, name, payload) ⇒ Catcher
constructor
A new instance of Catcher.
Methods included from ValidationMixin
included, #invalid_field_error!, #missing_field_error!, #parser_error!, #runtime_field_error!, #workflow_state?, #wrap_parser_error
Methods included from ErrorMatcherMixin
Constructor Details
#initialize(workflow, name, payload) ⇒ Catcher
Returns a new instance of Catcher.
11 12 13 14 15 16 17 18 19 20 21 |
# File 'lib/floe/workflow/catcher.rb', line 11 def initialize(workflow, name, payload) @name = name @payload = payload @error_equals = payload["ErrorEquals"] @next = payload["Next"] @result_path = ReferencePath.new(payload.fetch("ResultPath", "$")) missing_field_error!("ErrorEquals") if !@error_equals.kind_of?(Array) || @error_equals.empty? validate_state_next!(workflow) end |
Instance Attribute Details
#error_equals ⇒ Object (readonly)
Returns the value of attribute error_equals.
9 10 11 |
# File 'lib/floe/workflow/catcher.rb', line 9 def error_equals @error_equals end |
#name ⇒ Object (readonly)
Returns the value of attribute name.
9 10 11 |
# File 'lib/floe/workflow/catcher.rb', line 9 def name @name end |
#next ⇒ Object (readonly)
Returns the value of attribute next.
9 10 11 |
# File 'lib/floe/workflow/catcher.rb', line 9 def next @next end |
#result_path ⇒ Object (readonly)
Returns the value of attribute result_path.
9 10 11 |
# File 'lib/floe/workflow/catcher.rb', line 9 def result_path @result_path end |