Module: Udb::CertifiableObject
- Included in:
- Csr, CsrField, Extension, Instruction
- Defined in:
- lib/udb/obj/certifiable_obj.rb
Instance Method Summary collapse
- #cert_coverage_point(id) ⇒ CertNormativeRule?
-
#cert_coverage_point_hash ⇒ Hash<String, CertNormativeRule>
Hash with ID as key of all normative rules defined by database object.
- #cert_normative_rules ⇒ Array<CertNormativeRule>
- #cert_test_procedure(id) ⇒ CertTestProcedure?
-
#cert_test_procedure_hash ⇒ Hash<String, CertTestProcedure>
Hash of all normative rules defined by database object.
- #cert_test_procedures ⇒ Array<CertTestProcedure>
Instance Method Details
#cert_coverage_point(id) ⇒ CertNormativeRule?
36 37 38 |
# File 'lib/udb/obj/certifiable_obj.rb', line 36 def cert_coverage_point(id) cert_coverage_point_hash[id] end |
#cert_coverage_point_hash ⇒ Hash<String, CertNormativeRule>
Returns Hash with ID as key of all normative rules defined by database object.
23 24 25 26 27 28 29 30 31 |
# File 'lib/udb/obj/certifiable_obj.rb', line 23 def cert_coverage_point_hash return @cert_coverage_point_hash unless @cert_coverage_point_hash.nil? @cert_coverage_point_hash = {} cert_normative_rules.each do |cp| @cert_coverage_point_hash[cp.id] = cp end @cert_coverage_point_hash end |
#cert_normative_rules ⇒ Array<CertNormativeRule>
12 13 14 15 16 17 18 19 20 |
# File 'lib/udb/obj/certifiable_obj.rb', line 12 def cert_normative_rules return @cert_normative_rules unless @cert_normative_rules.nil? @cert_normative_rules = [] @data["cert_normative_rules"]&.each do |cert_data| @cert_normative_rules << CertNormativeRule.new(cert_data, self) end @cert_normative_rules end |
#cert_test_procedure(id) ⇒ CertTestProcedure?
65 66 67 |
# File 'lib/udb/obj/certifiable_obj.rb', line 65 def cert_test_procedure(id) cert_test_procedure_hash[id] end |
#cert_test_procedure_hash ⇒ Hash<String, CertTestProcedure>
Returns Hash of all normative rules defined by database object.
52 53 54 55 56 57 58 59 60 |
# File 'lib/udb/obj/certifiable_obj.rb', line 52 def cert_test_procedure_hash return @cert_test_procedure_hash unless @cert_test_procedure_hash.nil? @cert_test_procedure_hash = {} cert_test_procedures.each do |tp| @cert_test_procedure_hash[tp.id] = tp end @cert_test_procedure_hash end |
#cert_test_procedures ⇒ Array<CertTestProcedure>
41 42 43 44 45 46 47 48 49 |
# File 'lib/udb/obj/certifiable_obj.rb', line 41 def cert_test_procedures return @cert_test_procedures unless @cert_test_procedures.nil? @cert_test_procedures = [] @data["cert_test_procedures"]&.each do |cert_data| @cert_test_procedures << CertTestProcedure.new(cert_data, self) end @cert_test_procedures end |