class EnergyPlus::IdfObject
Attributes
comment[RW]
fields[RW]
type[RW]
Public Class Methods
new(object_type, object_fields, object_comment)
click to toggle source
# File lib/energyplus/IdfObject.rb, line 25 def initialize(object_type, object_fields, object_comment) @type = object_type @fields = object_fields @comment = object_comment end
Public Instance Methods
fieldString(fieldIdx)
click to toggle source
# File lib/energyplus/IdfObject.rb, line 39 def fieldString(fieldIdx) fieldString = @fields[fieldIdx].split(',') fieldString = fieldString[0].split(';')[0].gsub(" ", "") return fieldString end
fieldValue(fieldIdx)
click to toggle source
# File lib/energyplus/IdfObject.rb, line 31 def fieldValue(fieldIdx) fieldValue = @fields[fieldIdx].split(',') fieldValue = fieldValue[0].split(';')[0].gsub(" ", "") return fieldValue.to_f end
to_s()
click to toggle source
# File lib/energyplus/IdfObject.rb, line 47 def to_s string = '' string << @comment + "\n" if @comment string << @type + "\n" @fields.each { |field| string << field + "\n" } string << "\n" end