class ViewModel::SapSchema112::Sap
Public Instance Methods
construction_year()
click to toggle source
# File lib/view_model/sap_schema_112/sap.rb, line 8 def construction_year xpath(%w[Construction-Year]) end
cylinder_insul_thickness()
click to toggle source
# File lib/view_model/sap_schema_112/sap.rb, line 30 def cylinder_insul_thickness xpath(%w[Hot-Water-Store-Insulation-Thickness]) end
cylinder_insulation_type()
click to toggle source
# File lib/view_model/sap_schema_112/sap.rb, line 34 def cylinder_insulation_type xpath(%w[Hot-Water-Store-Insulation-Type]) end
cylinder_size()
click to toggle source
# File lib/view_model/sap_schema_112/sap.rb, line 38 def cylinder_size xpath(%w[Hot-Water-Store-Size]) end
has_cylinder_thermostat()
click to toggle source
# File lib/view_model/sap_schema_112/sap.rb, line 42 def has_cylinder_thermostat xpath(%w[Has-Cylinder-Thermostat]) end
main_dwelling_construction_age_band_or_year()
click to toggle source
# File lib/view_model/sap_schema_112/sap.rb, line 12 def main_dwelling_construction_age_band_or_year sap_building_parts = @xml_doc.xpath("//SAP-Building-Parts/SAP-Building-Part") sap_building_parts.each do |sap_building_part| building_part_number = sap_building_part.at("Building-Part-Number") # Identifies the Main Dwelling if building_part_number&.content == "1" return( sap_building_part.at_xpath( "Construction-Age-Band | Construction-Year", )&.content ) end end nil end
mech_vent_sys_index_number()
click to toggle source
# File lib/view_model/sap_schema_112/sap.rb, line 46 def mech_vent_sys_index_number xpath(%w[Mechanical-Vent-System-Index-Number]) end
mechanical_vent_data_source()
click to toggle source
# File lib/view_model/sap_schema_112/sap.rb, line 50 def mechanical_vent_data_source xpath(%w[Mechanical-Ventilation-Data-Source]) end
property_age_band()
click to toggle source
# File lib/view_model/sap_schema_112/sap.rb, line 4 def property_age_band construction_year end
thermal_store()
click to toggle source
# File lib/view_model/sap_schema_112/sap.rb, line 54 def thermal_store xpath(%w[Thermal-Store]) end
ventilation_type()
click to toggle source
# File lib/view_model/sap_schema_112/sap.rb, line 58 def ventilation_type xpath(%w[Ventilation-Type]) end
water_heating_fuel()
click to toggle source
# File lib/view_model/sap_schema_112/sap.rb, line 62 def water_heating_fuel xpath(%w[Water-Fuel-Type]) end