class ViewModel::Cepc71::AcCert
Public Instance Methods
ac_rated_output()
click to toggle source
# File lib/view_model/cepc71/ac_cert.rb, line 23 def ac_rated_output xpath(%w[AC-Rated-Output AC-kW-Rating]) end
ac_system_metered()
click to toggle source
# File lib/view_model/cepc71/ac_cert.rb, line 35 def ac_system_metered xpath( %w[Air-Conditioning-Inspection-Certificate AC-System-Metered-Flag], ) end
building_complexity()
click to toggle source
# File lib/view_model/cepc71/ac_cert.rb, line 15 def building_complexity xpath(%w[Building-Complexity]) end
f_gas_compliant_date()
click to toggle source
# File lib/view_model/cepc71/ac_cert.rb, line 19 def f_gas_compliant_date xpath(%w[Air-Conditioning-Inspection-Certificate F-Gas-Compliant-Date]) end
random_sampling()
click to toggle source
# File lib/view_model/cepc71/ac_cert.rb, line 27 def random_sampling xpath(%w[Air-Conditioning-Inspection-Certificate Random-Sampling-Flag]) end
refrigerant_charge()
click to toggle source
# File lib/view_model/cepc71/ac_cert.rb, line 41 def refrigerant_charge xpath( %w[Air-Conditioning-Inspection-Certificate Refrigerant-Charge-Total], ) end
subsystems()
click to toggle source
# File lib/view_model/cepc71/ac_cert.rb, line 51 def subsystems @xml_doc.search("AC-Sub-System").select(&:element?).map { |node| { number: xpath(%w[Sub-System-Number], node), description: xpath(%w[Sub-System-Description], node), age: xpath(%w[Sub-System-Age], node), refrigerantType: xpath(%w[Refrigerant-Type], node), } }.compact end
treated_floor_area()
click to toggle source
# File lib/view_model/cepc71/ac_cert.rb, line 31 def treated_floor_area xpath(%w[Air-Conditioning-Inspection-Certificate Treated-Floor-Area]) end
xpath(queries, node = @xml_doc)
click to toggle source
# File lib/view_model/cepc71/ac_cert.rb, line 4 def xpath(queries, node = @xml_doc) queries.each do |query| if node node = node.at query else return nil end end node ? node.content : nil end