Class: Udb::PortfolioClass

Inherits:
TopLevelDatabaseObject show all
Defined in:
lib/udb/obj/portfolio.rb

Overview

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

Direct Known Subclasses

ProcCertClass, ProfileFamily

Instance Method Summary collapse

Constructor Details

This class inherits a constructor from Udb::TopLevelDatabaseObject

Instance Method Details

#descriptionString

Returns Large enough to need its own heading (generally one level deeper than the “introduction”).

Returns:

  • (String)

    Large enough to need its own heading (generally one level deeper than the “introduction”).



37
# File 'lib/udb/obj/portfolio.rb', line 37

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)


40
41
42
# File 'lib/udb/obj/portfolio.rb', line 40

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

#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.



34
# File 'lib/udb/obj/portfolio.rb', line 34

def introduction = @data["introduction"]

#portfolio_classes_matching_portfolio_kind_and_processor_kindArray<PortfolioClass] All portfolio classes that have the same portfolio kind and same processor kind.

Returns Array<PortfolioClass] All portfolio classes that have the same portfolio kind and same processor kind.

Returns:

  • (Array<PortfolioClass] All portfolio classes that have the same portfolio kind and same processor kind.)

    Array<PortfolioClass] All portfolio classes that have the same portfolio kind and same processor kind.



45
46
47
48
# File 'lib/udb/obj/portfolio.rb', line 45

def portfolio_classes_matching_portfolio_kind_and_processor_kind
  arch.portfolio_classes.select {|portfolio_class|
    (portfolio_class.kind == kind) && (portfolio_class.processor_kind == processor_kind)}
end

#processor_kindString

Returns What kind of processor portfolio is this?.

Returns:

  • (String)

    What kind of processor portfolio is this?



31
# File 'lib/udb/obj/portfolio.rb', line 31

def processor_kind = @data["processor_kind"]