epb_view_models 2.0.17 → 2.0.19
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/api/schemas/xml/CEPC-S-7.1/Reports/BaseDataTypes.xsd +300 -300
- data/api/schemas/xml/CEPC-S-7.1/Reports/CEPC-Reports.xsd +66 -66
- data/api/schemas/xml/CEPC-S-7.1/Reports/Input-Data.xsd +34 -34
- data/api/schemas/xml/CEPC-S-7.1/Reports/Performance-Summary.xsd +125 -125
- data/api/schemas/xml/CEPC-S-7.1/Reports/Performance-Summary.xsd.bak +123 -123
- data/api/schemas/xml/CEPC-S-7.1/Reports/Property.xsd +67 -67
- data/api/schemas/xml/CEPC-S-7.1/Reports/Report-Header.xsd +178 -178
- data/api/schemas/xml/CEPC-S-7.1/Reports/Reported-Data.xsd +406 -406
- data/api/schemas/xml/CEPC-S-7.1/Reports/UserManagement.xsd +174 -174
- data/api/schemas/xml/RdSAP-Schema-S-19.0/RdSAP/ExternalDefinitions.xsd +261 -261
- data/api/schemas/xml/RdSAP-Schema-S-19.0/RdSAP/Templates/AssessorManagement.xsd +213 -213
- data/api/schemas/xml/RdSAP-Schema-S-19.0/RdSAP/Templates/EPC-Certificate.xsd +400 -400
- data/api/schemas/xml/RdSAP-Schema-S-19.0/RdSAP/Templates/EPC-CollectedData.xsd +1051 -1051
- data/api/schemas/xml/RdSAP-Schema-S-19.0/RdSAP/Templates/Property.xsd +66 -66
- data/api/schemas/xml/RdSAP-Schema-S-19.0/RdSAP/Templates/RdSAP-Report.xsd +176 -176
- data/api/schemas/xml/RdSAP-Schema-S-19.0/RdSAP/Templates/ReportList.xsd +26 -26
- data/api/schemas/xml/RdSAP-Schema-S-19.0/RdSAP/UDT/EPC-Domains.xsd +858 -858
- data/api/schemas/xml/RdSAP-Schema-S-19.0/RdSAP/UDT/SAP-Domains.xsd +2684 -2684
- data/lib/epb_view_models.rb +1 -1
- data/lib/view_model/cepc_s_71/cepc.rb +6 -0
- data/lib/view_model/rd_sap_schema_210/common_schema.rb +31 -0
- metadata +2 -2
data/lib/epb_view_models.rb
CHANGED
@@ -1,6 +1,12 @@
|
|
1
1
|
module ViewModel
|
2
2
|
module CepcS71
|
3
3
|
class Cepc < ViewModel::Cepc71::CommonSchema
|
4
|
+
def date_of_expiry
|
5
|
+
expires_at = (Date.parse(date_of_registration) - 1) >> 12 * 10
|
6
|
+
|
7
|
+
expires_at.to_s
|
8
|
+
end
|
9
|
+
|
4
10
|
def ac_inspection_commissioned
|
5
11
|
xpath(%w[AC-Inspection-Commissioned])
|
6
12
|
end
|
@@ -397,6 +397,37 @@ module ViewModel
|
|
397
397
|
xpath(%w[Heated-Room-Count])&.to_i
|
398
398
|
end
|
399
399
|
|
400
|
+
def low_energy_lighting
|
401
|
+
(low_energy_fixed_lighting_outlets_count / fixed_lighting_outlets_count) * 100
|
402
|
+
end
|
403
|
+
|
404
|
+
def fixed_lighting_outlets_count
|
405
|
+
fixed_lighting_outlets_count = low_energy_fixed_lighting_outlets_count
|
406
|
+
if xpath(%w[Incandescent-Lighting-Bulbs-Count])
|
407
|
+
fixed_lighting_outlets_count += xpath(%w[Incandescent-Lighting-Bulbs-Count])&.to_i
|
408
|
+
end
|
409
|
+
fixed_lighting_outlets_count
|
410
|
+
end
|
411
|
+
|
412
|
+
def low_energy_fixed_lighting_outlets_count
|
413
|
+
low_energy_fixed_lighting_outlets_count = 0
|
414
|
+
if xpath(%w[CFL-Fixed-Lighting-Bulbs-Count])
|
415
|
+
low_energy_fixed_lighting_outlets_count += xpath(%w[CFL-Fixed-Lighting-Bulbs-Count])&.to_i
|
416
|
+
end
|
417
|
+
if xpath(%w[LED-Fixed-Lighting-Bulbs-Count])
|
418
|
+
low_energy_fixed_lighting_outlets_count += xpath(%w[LED-Fixed-Lighting-Bulbs-Count])&.to_i
|
419
|
+
end
|
420
|
+
if xpath(%w[Low-Energy-Fixed-Lighting-Bulbs-Count])
|
421
|
+
low_energy_fixed_lighting_outlets_count += xpath(%w[Low-Energy-Fixed-Lighting-Bulbs-Count])&.to_i
|
422
|
+
end
|
423
|
+
|
424
|
+
low_energy_fixed_lighting_outlets_count
|
425
|
+
end
|
426
|
+
|
427
|
+
def open_fireplaces_count
|
428
|
+
xpath(%w[Open-Chimneys-Count])&.to_i
|
429
|
+
end
|
430
|
+
|
400
431
|
def hot_water_description
|
401
432
|
xpath(%w[Hot-Water Description])
|
402
433
|
end
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: epb_view_models
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 2.0.
|
4
|
+
version: 2.0.19
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- DLUHC Energy Performance of Buildings
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date: 2025-
|
11
|
+
date: 2025-06-02 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: nokogiri
|