Class: WorkflowStepResult_Shim
- Inherits:
-
Object
- Object
- WorkflowStepResult_Shim
- Defined in:
- lib/openstudio/workflow_json.rb
Overview
WorkflowStepResult_Shim provides a shim interface to the WorkflowStepResult class in OpenStudio 2.X when running in OpenStudio 1.X
Instance Method Summary collapse
-
#initialize(result) ⇒ WorkflowStepResult_Shim
constructor
A new instance of WorkflowStepResult_Shim.
- #setStepResult(step_result) ⇒ Object
- #stepErrors ⇒ Object
- #stepFinalCondition ⇒ Object
- #stepInfo ⇒ Object
- #stepInitialCondition ⇒ Object
- #stepResult ⇒ Object
- #stepValues ⇒ Object
- #stepWarnings ⇒ Object
Constructor Details
#initialize(result) ⇒ WorkflowStepResult_Shim
Returns a new instance of WorkflowStepResult_Shim.
117 118 119 |
# File 'lib/openstudio/workflow_json.rb', line 117 def initialize(result) @result = result end |
Instance Method Details
#setStepResult(step_result) ⇒ Object
161 162 163 |
# File 'lib/openstudio/workflow_json.rb', line 161 def setStepResult(step_result) @result[:step_result] = step_result end |
#stepErrors ⇒ Object
137 138 139 |
# File 'lib/openstudio/workflow_json.rb', line 137 def stepErrors return @result[:step_errors] end |
#stepFinalCondition ⇒ Object
129 130 131 132 133 134 135 |
# File 'lib/openstudio/workflow_json.rb', line 129 def stepFinalCondition if @result[:final_condition] return Optional_Shim.new(@result[:final_condition]) end return Optional_Shim.new(nil) end |
#stepInfo ⇒ Object
145 146 147 |
# File 'lib/openstudio/workflow_json.rb', line 145 def stepInfo return @result[:step_info] end |
#stepInitialCondition ⇒ Object
121 122 123 124 125 126 127 |
# File 'lib/openstudio/workflow_json.rb', line 121 def stepInitialCondition if @result[:initial_condition] return Optional_Shim.new(@result[:initial_condition]) end return Optional_Shim.new(nil) end |
#stepResult ⇒ Object
157 158 159 |
# File 'lib/openstudio/workflow_json.rb', line 157 def stepResult Optional_Shim.new(@result[:step_result]) end |
#stepValues ⇒ Object
149 150 151 152 153 154 155 |
# File 'lib/openstudio/workflow_json.rb', line 149 def stepValues result = [] @result[:step_values].each do |step_value| result << WorkflowStepResultValue_Shim.new(step_value[:name], step_value[:value], step_value[:type]) end return result end |
#stepWarnings ⇒ Object
141 142 143 |
# File 'lib/openstudio/workflow_json.rb', line 141 def stepWarnings return @result[:step_warnings] end |