Class: BuildingSync::FoundationSystemType

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

Overview

Foundation System Type

Instance Method Summary collapse

Constructor Details

#initialize(doc, ns, ref) ⇒ FoundationSystemType

initialize a foundation 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/foundation_system_type.rb', line 47

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

Instance Method Details

#read(foundation_system, ns) ⇒ Object

read

Parameters:

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


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

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