35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
|
# File 'lib/energyplus/DDYFile.rb', line 35
def objects
objects = []
object_fields = []
object_type = ''
inobject = false
= nil
@lines.each_index do |i|
if not inobject and @lines[i] =~ /^\s*\w/
object_fields = []
inobject = true
object_type = @lines[i]
if @lines[i-1] =~ /^\s*!/
= @lines[i-1]
end
elsif inobject and @lines[i] =~ /^[^!]*;/
object_fields << @lines[i]
inobject = false
objects << IdfObject.new(object_type,object_fields,)
elsif inobject
object_fields << @lines[i]
else
end
end
return objects
end
|