Class: Udb::ProfileRelease
- Inherits:
-
TopLevelDatabaseObject
- Object
- DatabaseObject
- TopLevelDatabaseObject
- Udb::ProfileRelease
- Defined in:
- lib/udb/obj/profile.rb
Overview
A profile release consists of a number of releases each with one or more profiles. For example, the RVA20 profile release has profiles RVA20U64 and RVA20S64. Note there is no Portfolio base class for a ProfileRelease to inherit from since there is no equivalent to a ProfileRelease in a Certificate so no potential for a shared base class.
Instance Method Summary collapse
-
#contributors ⇒ Array<Person>
Contributors to the profile spec.
-
#csr_presence(csr_name) ⇒ String
Given a CSR
csr_name
, return the presence as a string. -
#extension_presence(ext_name) ⇒ String
Given an extension
ext_name
, return the presence as a string. -
#in_scope_extensions ⇒ Array<Extension>
List of all mandatory or optional extensions referenced by this profile release.
-
#instruction_presence(inst_name) ⇒ String
Given an instruction
inst_name
, return the presence as a string. -
#introduction ⇒ String
Small enough (~1 paragraph) to be suitable immediately after a higher-level heading.
- #marketing_name ⇒ Object
-
#portfolio_grp ⇒ PortfolioGroup
All portfolios in this profile release.
-
#profile_family ⇒ ProfileFamily
Profile Family that this ProfileRelease belongs to.
-
#profiles ⇒ Array<Profile>
All profiles in this profile release.
- #ratification_date ⇒ Date?
- #state ⇒ Object
Constructor Details
This class inherits a constructor from Udb::TopLevelDatabaseObject
Instance Method Details
#contributors ⇒ Array<Person>
Returns Contributors to the profile spec.
113 114 115 116 117 |
# File 'lib/udb/obj/profile.rb', line 113 def contributors return nil if @data["contributors"].nil? @data["contributors"].map { |data| Person.new(data) } end |
#csr_presence(csr_name) ⇒ String
Given a CSR csr_name
, return the presence as a string. Returns the greatest presence string across all profiles in the release. If the CSR name isn’t found in the release, return “-”.
165 |
# File 'lib/udb/obj/profile.rb', line 165 def csr_presence(csr_name) = portfolio_grp.csr_presence(csr_name) |
#extension_presence(ext_name) ⇒ String
Given an extension ext_name
, return the presence as a string. Returns the greatest presence string across all profiles in the release. If the extension name isn’t found in the release, return “-”.
155 |
# File 'lib/udb/obj/profile.rb', line 155 def extension_presence(ext_name) = portfolio_grp.extension_presence(ext_name) |
#in_scope_extensions ⇒ Array<Extension>
Returns List of all mandatory or optional extensions referenced by this profile release.
150 |
# File 'lib/udb/obj/profile.rb', line 150 def in_scope_extensions = portfolio_grp.in_scope_extensions |
#instruction_presence(inst_name) ⇒ String
Given an instruction inst_name
, return the presence as a string. Returns the greatest presence string across all profiles in the release. If the instruction name isn’t found in the release, return “-”.
160 |
# File 'lib/udb/obj/profile.rb', line 160 def instruction_presence(inst_name) = portfolio_grp.instruction_presence(inst_name) |
#introduction ⇒ String
Returns Small enough (~1 paragraph) to be suitable immediately after a higher-level heading.
100 |
# File 'lib/udb/obj/profile.rb', line 100 def introduction = @data["introduction"] |
#marketing_name ⇒ Object
97 |
# File 'lib/udb/obj/profile.rb', line 97 def marketing_name = @data["marketing_name"] |
#portfolio_grp ⇒ PortfolioGroup
Returns All portfolios in this profile release.
139 140 141 142 143 |
# File 'lib/udb/obj/profile.rb', line 139 def portfolio_grp return @portfolio_grp unless @portfolio_grp.nil? @portfolio_grp = PortfolioGroup.new(marketing_name, profiles) end |
#profile_family ⇒ ProfileFamily
Returns Profile Family that this ProfileRelease belongs to.
120 121 122 123 124 125 |
# File 'lib/udb/obj/profile.rb', line 120 def profile_family profile_family = @arch.ref(@data["family"]['$ref']) raise "No profile family named '#{@data["family"]}'" if profile_family.nil? profile_family end |
#profiles ⇒ Array<Profile>
Returns All profiles in this profile release.
128 129 130 131 132 133 134 135 136 |
# File 'lib/udb/obj/profile.rb', line 128 def profiles return @profiles unless @profiles.nil? @profiles = [] @data["profiles"].each do |profile_ref| @profiles << @arch.ref(profile_ref["$ref"]) end @profiles end |
#ratification_date ⇒ Date?
106 107 108 109 110 |
# File 'lib/udb/obj/profile.rb', line 106 def ratification_date return nil if @data["ratification_date"].nil? Date.parse(@data["ratification_date"]) end |
#state ⇒ Object
102 |
# File 'lib/udb/obj/profile.rb', line 102 def state = @data["state"] |