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

#all_in_scope_paramsObject



153
154
155
# File 'lib/udb/obj/profile.rb', line 153

def all_in_scope_params
  [Portfolio::InScopeParameter.new(@cfg_arch.param("MXLEN"), { "const" => @data["base"] }, "")]
end

#contributorsArray<Person>

Returns Contributors to the profile spec.

Returns:

  • (Array<Person>)

    Contributors to the profile spec



114
115
116
117
118
# File 'lib/udb/obj/profile.rb', line 114

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



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

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



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

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.



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

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



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

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.



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

def introduction = @data["introduction"]

#marketing_nameObject



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

def marketing_name = @data["marketing_name"]

#portfolio_grpPortfolioGroup

Returns All portfolios in this profile release.

Returns:



140
141
142
143
144
# File 'lib/udb/obj/profile.rb', line 140

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



121
122
123
124
125
126
# File 'lib/udb/obj/profile.rb', line 121

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



129
130
131
132
133
134
135
136
137
# File 'lib/udb/obj/profile.rb', line 129

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



107
108
109
110
111
# File 'lib/udb/obj/profile.rb', line 107

def ratification_date
  return nil if @data["ratification_date"].nil?

  Date.parse(@data["ratification_date"])
end

#stateObject



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

def state = @data["state"]