Method: OpenStudio::Analysis::Workflow#to_hash
- Defined in:
- lib/openstudio/analysis/workflow.rb
#to_hash(version = 1) ⇒ Object
Save the workflow to a hash object
218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 |
# File 'lib/openstudio/analysis/workflow.rb', line 218 def to_hash(version = 1) h = nil if version == 1 arr = [] @items.each_with_index do |item, index| temp_h = item.to_hash(version) temp_h[:workflow_index] = index arr << temp_h end h = arr else raise "Version #{version} not yet implemented for to_hash" end h end |