Class: Retab::UpdateWorkflowTestRequest
- Inherits:
-
Types::BaseModel
- Object
- Types::BaseModel
- Retab::UpdateWorkflowTestRequest
- Defined in:
- lib/retab/workflow_tests/update_workflow_test_request.rb
Constant Summary collapse
- HASH_ATTRS =
{ name: :name, assertion: :assertion, source: :source }.freeze
Instance Attribute Summary collapse
-
#assertion ⇒ Object
Returns the value of attribute assertion.
-
#name ⇒ Object
Returns the value of attribute name.
-
#source ⇒ Object
Returns the value of attribute source.
Attributes inherited from Types::BaseModel
Instance Method Summary collapse
-
#initialize(json) ⇒ UpdateWorkflowTestRequest
constructor
A new instance of UpdateWorkflowTestRequest.
Methods inherited from Types::BaseModel
deep_symbolize, #inspect, normalize, #to_h, #to_json
Constructor Details
#initialize(json) ⇒ UpdateWorkflowTestRequest
Returns a new instance of UpdateWorkflowTestRequest.
20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 |
# File 'lib/retab/workflow_tests/update_workflow_test_request.rb', line 20 def initialize(json) super() hash = self.class.normalize(json) @name = hash[:name] @assertion = hash[:assertion] ? Retab::AssertionSpec.new(hash[:assertion]) : nil @source = hash[:source] ? ( case hash[:source][:type] when "manual" Retab::ManualWorkflowTestSource.new(hash[:source]) when "run_step" Retab::RunStepWorkflowTestSource.new(hash[:source]) else hash[:source] end ) : nil end |
Instance Attribute Details
#assertion ⇒ Object
Returns the value of attribute assertion.
14 15 16 |
# File 'lib/retab/workflow_tests/update_workflow_test_request.rb', line 14 def assertion @assertion end |
#name ⇒ Object
Returns the value of attribute name.
14 15 16 |
# File 'lib/retab/workflow_tests/update_workflow_test_request.rb', line 14 def name @name end |
#source ⇒ Object
Returns the value of attribute source.
14 15 16 |
# File 'lib/retab/workflow_tests/update_workflow_test_request.rb', line 14 def source @source end |