Class: ProfileRelease
- Inherits:
-
ArchDefObject
- Object
- ArchDefObject
- ProfileRelease
- Defined in:
- lib/arch_obj_models/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.
-
#initialize(data, arch_def) ⇒ ProfileRelease
constructor
A new instance of ProfileRelease.
- #introduction ⇒ Object
- #marketing_name ⇒ Object
-
#profile_class ⇒ ProfileClass
Profile Class that this ProfileRelease belongs to.
-
#profiles ⇒ Array<Profile>
All profiles in this profile release.
- #ratification_date ⇒ Date?
-
#referenced_extensions ⇒ Array<Extension>
List of all extensions referenced by the release.
- #state ⇒ Object
Constructor Details
#initialize(data, arch_def) ⇒ ProfileRelease
Returns a new instance of ProfileRelease.
73 74 75 76 |
# File 'lib/arch_obj_models/profile.rb', line 73 def initialize(data, arch_def) super(data) @arch_def = arch_def end |
Instance Method Details
#contributors ⇒ Array<Person>
Returns Contributors to the profile spec.
91 92 93 |
# File 'lib/arch_obj_models/profile.rb', line 91 def contributors @data["contributors"].map { |data| Person.new(data) } end |
#introduction ⇒ Object
79 |
# File 'lib/arch_obj_models/profile.rb', line 79 def introduction = @data["introduction"] |
#marketing_name ⇒ Object
78 |
# File 'lib/arch_obj_models/profile.rb', line 78 def marketing_name = @data["marketing_name"] |
#profile_class ⇒ ProfileClass
Returns Profile Class that this ProfileRelease belongs to.
96 97 98 99 100 101 |
# File 'lib/arch_obj_models/profile.rb', line 96 def profile_class profile_class = @arch_def.profile_class(@data["class"]) raise "No profile class named '#{@data["class"]}'" if profile_class.nil? profile_class end |
#profiles ⇒ Array<Profile>
Returns All profiles in this profile release.
104 105 106 107 108 109 110 111 112 113 114 |
# File 'lib/arch_obj_models/profile.rb', line 104 def profiles return @profiles unless @profiles.nil? @profiles = [] @arch_def.profiles.each do |profile| if profile.profile_release.name == name @profiles << profile end end @profiles end |
#ratification_date ⇒ Date?
84 85 86 87 88 |
# File 'lib/arch_obj_models/profile.rb', line 84 def ratification_date return nil if @data["ratification_date"].nil? Date.parse(@data["ratification_date"]) end |
#referenced_extensions ⇒ Array<Extension>
Returns List of all extensions referenced by the release.
117 118 119 120 121 122 123 124 125 126 127 128 |
# File 'lib/arch_obj_models/profile.rb', line 117 def referenced_extensions return @referenced_extensions unless @referenced_extensions.nil? @referenced_extensions = [] profiles.each do |profile| @referenced_extensions += profile.in_scope_extensions end @referenced_extensions.uniq!(&:name) @referenced_extensions end |
#state ⇒ Object
80 |
# File 'lib/arch_obj_models/profile.rb', line 80 def state = @data["state"] |