Class: BuildingSync::RoofSystemType

Inherits:
Object
  • Object
show all
Defined in:
lib/buildingsync/model_articulation/roof_system_type.rb

Overview

Roof System Type

Instance Method Summary collapse

Constructor Details

#initialize(doc, ns, ref) ⇒ RoofSystemType

initialize a specific floor system type given a ref

Parameters:

  • doc (REXML::Document)
  • ns (String)
  • ref (String)


47
48
49
50
51
52
53
54
# File 'lib/buildingsync/model_articulation/roof_system_type.rb', line 47

def initialize(doc, ns, ref)
  @id = nil
  doc.elements.each("#{ns}:Systems/#{ns}:RoofSystems/#{ns}:RoofSystem") do |roof_system|
    if roof_system.attributes['ID'] == ref
      read(roof_system, ns)
    end
  end
end

Instance Method Details

#read(roof_system, ns) ⇒ Object

read

Parameters:

  • roof_system (REXML:Element)
  • ns (String)


59
60
61
62
# File 'lib/buildingsync/model_articulation/roof_system_type.rb', line 59

def read(roof_system, ns)
  # ID
  @id = roof_system.attributes['ID'] if roof_system.attributes['ID']
end