Class: Udb::ProfileRelease

Inherits:
TopLevelDatabaseObject show all
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

Constructor Details

This class inherits a constructor from Udb::TopLevelDatabaseObject

Instance Method Details

#contributorsArray<Person>

Returns Contributors to the profile spec.

Returns:

  • (Array<Person>)

    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 “-”.

Returns:

  • (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 “-”.

Returns:

  • (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_extensionsArray<Extension>

Returns List of all mandatory or optional extensions referenced by this profile release.

Returns:

  • (Array<Extension>)

    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 “-”.

Returns:

  • (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)

#introductionString

Returns Small enough (~1 paragraph) to be suitable immediately after a higher-level heading.

Returns:

  • (String)

    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_nameObject



97
# File 'lib/udb/obj/profile.rb', line 97

def marketing_name = @data["marketing_name"]

#portfolio_grpPortfolioGroup

Returns All portfolios in this profile release.

Returns:



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_familyProfileFamily

Returns Profile Family that this ProfileRelease belongs to.

Returns:

  • (ProfileFamily)

    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

#profilesArray<Profile>

Returns All profiles in this profile release.

Returns:

  • (Array<Profile>)

    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_dateDate?

Returns:

  • (Date)

    Ratification date

  • (nil)

    if the profile is not ratified



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

#stateObject



102
# File 'lib/udb/obj/profile.rb', line 102

def state = @data["state"]