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
#inspect, normalize, #to_h, #to_json
Constructor Details
#initialize(json) ⇒ UpdateWorkflowTestRequest
Returns a new instance of UpdateWorkflowTestRequest.
19 20 21 22 23 24 |
# File 'lib/retab/workflow_tests/update_workflow_test_request.rb', line 19 def initialize(json) 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" then Retab::ManualWorkflowTestSource.new(hash[:source]) when "run_step" then 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 |