Class: ViewModel::Cepc31::Cepc

Inherits:
CommonSchema show all
Defined in:
lib/view_model/cepc31/cepc.rb

Instance Method Summary collapse

Methods inherited from CommonSchema

#address_id, #address_line1, #address_line2, #address_line3, #address_line4, #all_energy_types, #all_reason_types, #all_start_dates, #assessment_id, #assessor_email, #assessor_name, #assessor_telephone, #calculation_tool, #company_address, #company_name, #date_of_assessment, #date_of_expiry, #date_of_issue, #date_of_registration, #inspection_type, #or_assessment_end_date, #postcode, #report_type, #scheme_assessor_id, #town

Methods inherited from BaseViewModel

#initialize, #xpath

Constructor Details

This class inherits a constructor from ViewModel::BaseViewModel

Instance Method Details

#building_environmentObject



4
5
6
# File 'lib/view_model/cepc31/cepc.rb', line 4

def building_environment
  xpath(%w[Building-Environment])
end

#building_levelObject



8
9
10
# File 'lib/view_model/cepc31/cepc.rb', line 8

def building_level
  xpath(%w[Building-Level])&.to_i
end

#energy_efficiency_ratingObject



12
13
14
# File 'lib/view_model/cepc31/cepc.rb', line 12

def energy_efficiency_rating
  xpath(%w[Asset-Rating])&.to_i
end


16
17
18
# File 'lib/view_model/cepc31/cepc.rb', line 16

def epc_related_party_disclosure
  xpath(%w[Related-Party-Disclosure])
end

#existing_build_ratingObject



20
21
22
# File 'lib/view_model/cepc31/cepc.rb', line 20

def existing_build_rating
  xpath(%w[Existing-Stock-Benchmark])&.to_i
end

#floor_areaObject



24
25
26
# File 'lib/view_model/cepc31/cepc.rb', line 24

def floor_area
  xpath(%w[Technical-Information Floor-Area])
end

#main_heating_fuelObject



28
29
30
# File 'lib/view_model/cepc31/cepc.rb', line 28

def main_heating_fuel
  xpath(%w[Main-Heating-Fuel])
end

#new_build_ratingObject



32
33
34
# File 'lib/view_model/cepc31/cepc.rb', line 32

def new_build_rating
  xpath(%w[New-Build-Benchmark])&.to_i
end

#other_fuel_descriptionObject



36
37
38
# File 'lib/view_model/cepc31/cepc.rb', line 36

def other_fuel_description
  xpath(%w[Other-Fuel-Description])
end

#primary_energy_useObject



40
41
42
# File 'lib/view_model/cepc31/cepc.rb', line 40

def primary_energy_use
  xpath(%w[Energy-Consumption-Current])
end

#property_typeObject



44
45
46
# File 'lib/view_model/cepc31/cepc.rb', line 44

def property_type
  xpath(%w[Property-Type])
end


48
49
50
# File 'lib/view_model/cepc31/cepc.rb', line 48

def related_rrn
  xpath(%w[Related-RRN])
end

#renewable_sourcesObject



56
57
58
# File 'lib/view_model/cepc31/cepc.rb', line 56

def renewable_sources
  xpath(%w[Renewable-Sources])
end

#special_energy_usesObject



52
53
54
# File 'lib/view_model/cepc31/cepc.rb', line 52

def special_energy_uses
  xpath(%w[Special-Energy-Uses])
end