Class: ViewModel::CepcS71::Cepc
Instance Method Summary
collapse
#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_issue, #date_of_registration, #inspection_type, #or_assessment_end_date, #postcode, #report_type, #scheme_assessor_id, #town
#initialize, #xpath
Instance Method Details
#ac_inspection_commissioned ⇒ Object
10
11
12
|
# File 'lib/view_model/cepc_s_71/cepc.rb', line 10
def ac_inspection_commissioned
xpath(%w[AC-Inspection-Commissioned])
end
|
#ac_kw_rating ⇒ Object
14
15
16
|
# File 'lib/view_model/cepc_s_71/cepc.rb', line 14
def ac_kw_rating
xpath(%w[AC-kW-Rating])&.to_i
end
|
#ac_present ⇒ Object
18
19
20
|
# File 'lib/view_model/cepc_s_71/cepc.rb', line 18
def ac_present
xpath(%w[AC-Present])
end
|
#ac_rated_output ⇒ Object
22
23
24
|
# File 'lib/view_model/cepc_s_71/cepc.rb', line 22
def ac_rated_output
xpath(%w[AC-Rated-Output])
end
|
#building_emission_rate ⇒ Object
26
27
28
|
# File 'lib/view_model/cepc_s_71/cepc.rb', line 26
def building_emission_rate
xpath(%w[BER])
end
|
#building_environment ⇒ Object
30
31
32
|
# File 'lib/view_model/cepc_s_71/cepc.rb', line 30
def building_environment
xpath(%w[Building-Environment])
end
|
#building_level ⇒ Object
34
35
36
|
# File 'lib/view_model/cepc_s_71/cepc.rb', line 34
def building_level
xpath(%w[Building-Level])&.to_i
end
|
#date_of_expiry ⇒ Object
4
5
6
7
8
|
# File 'lib/view_model/cepc_s_71/cepc.rb', line 4
def date_of_expiry
expires_at = (Date.parse(date_of_registration) - 1) >> 12 * 10
expires_at.to_s
end
|
#energy_efficiency_rating ⇒ Object
38
39
40
|
# File 'lib/view_model/cepc_s_71/cepc.rb', line 38
def energy_efficiency_rating
xpath(%w[Asset-Rating])&.to_i
end
|
42
43
44
|
# File 'lib/view_model/cepc_s_71/cepc.rb', line 42
def epc_related_party_disclosure
xpath(%w[EPC-Related-Party-Disclosure])
end
|
#estimated_ac_kw_rating ⇒ Object
46
47
48
|
# File 'lib/view_model/cepc_s_71/cepc.rb', line 46
def estimated_ac_kw_rating
xpath(%w[AC-Estimated-Output])&.to_i
end
|
#existing_build_rating ⇒ Object
50
51
52
|
# File 'lib/view_model/cepc_s_71/cepc.rb', line 50
def existing_build_rating
xpath(%w[Existing-Stock-Benchmark])&.to_i
end
|
#floor_area ⇒ Object
54
55
56
|
# File 'lib/view_model/cepc_s_71/cepc.rb', line 54
def floor_area
xpath(%w[Technical-Information Floor-Area])
end
|
#main_heating_fuel ⇒ Object
58
59
60
|
# File 'lib/view_model/cepc_s_71/cepc.rb', line 58
def main_heating_fuel
xpath(%w[Main-Heating-Fuel])
end
|
#new_build_rating ⇒ Object
62
63
64
|
# File 'lib/view_model/cepc_s_71/cepc.rb', line 62
def new_build_rating
xpath(%w[New-Build-Benchmark])&.to_i
end
|
#other_fuel_description ⇒ Object
66
67
68
|
# File 'lib/view_model/cepc_s_71/cepc.rb', line 66
def other_fuel_description
xpath(%w[Other-Fuel-Description])
end
|
#primary_energy_use ⇒ Object
70
71
72
|
# File 'lib/view_model/cepc_s_71/cepc.rb', line 70
def primary_energy_use
xpath(%w[Energy-Consumption-Current])
end
|
#property_type ⇒ Object
74
75
76
|
# File 'lib/view_model/cepc_s_71/cepc.rb', line 74
def property_type
xpath(%w[Property-Type])
end
|
78
79
80
|
# File 'lib/view_model/cepc_s_71/cepc.rb', line 78
def related_rrn
xpath(%w[Related-RRN])
end
|
#renewable_sources ⇒ Object
102
103
104
|
# File 'lib/view_model/cepc_s_71/cepc.rb', line 102
def renewable_sources
xpath(%w[Renewable-Sources])
end
|
#special_energy_uses ⇒ Object
82
83
84
|
# File 'lib/view_model/cepc_s_71/cepc.rb', line 82
def special_energy_uses
xpath(%w[Special-Energy-Uses])
end
|
#standard_emissions ⇒ Object
86
87
88
|
# File 'lib/view_model/cepc_s_71/cepc.rb', line 86
def standard_emissions
xpath(%w[SER])
end
|
#target_emissions ⇒ Object
90
91
92
|
# File 'lib/view_model/cepc_s_71/cepc.rb', line 90
def target_emissions
xpath(%w[TER])
end
|
#transaction_type ⇒ Object
94
95
96
|
# File 'lib/view_model/cepc_s_71/cepc.rb', line 94
def transaction_type
xpath(%w[Transaction-Type])
end
|
#typical_emissions ⇒ Object
98
99
100
|
# File 'lib/view_model/cepc_s_71/cepc.rb', line 98
def typical_emissions
xpath(%w[TYR])
end
|