Class: PortfolioClass

Inherits:
ArchDefObject show all
Defined in:
lib/arch_obj_models/portfolio.rb

Overview

Holds information from Portfolio class YAML file (certificate class or profile class). The inherited “data” member is the database of extensions, instructions, CSRs, etc.

Direct Known Subclasses

CertClass, ProfileClass

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(data, arch_def) ⇒ PortfolioClass

Returns a new instance of PortfolioClass.

Parameters:

  • data (Hash<String, Object>)

    The data from YAML

  • arch_def (ArchDef)

    Architecture spec



27
28
29
30
# File 'lib/arch_obj_models/portfolio.rb', line 27

def initialize(data, arch_def)
  super(data)
  @arch_def = arch_def
end

Instance Attribute Details

#arch_defArchDef (readonly)

Returns The defining ArchDef.

Returns:

  • (ArchDef)

    The defining ArchDef



23
24
25
# File 'lib/arch_obj_models/portfolio.rb', line 23

def arch_def
  @arch_def
end

Instance Method Details

#descriptionObject



34
# File 'lib/arch_obj_models/portfolio.rb', line 34

def description = @data["description"]

#eql?(other) ⇒ Boolean

Returns true if other is the same class (not a derived class) and has the same name.

Returns:

  • (Boolean)


37
38
39
# File 'lib/arch_obj_models/portfolio.rb', line 37

def eql?(other)
  other.instance_of?(self.class) && other.name == name
end

#introductionObject



32
# File 'lib/arch_obj_models/portfolio.rb', line 32

def introduction = @data["introduction"]

#naming_schemeObject



33
# File 'lib/arch_obj_models/portfolio.rb', line 33

def naming_scheme = @data["naming_scheme"]