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

ProfileFamily

Instance Attribute Summary

Attributes inherited from DatabaseObject

#arch, #data, #data_path, #long_name, #name

Instance Method Summary collapse

Methods inherited from TopLevelDatabaseObject

create_json_schemer_resolver, #initialize, #key?, #keys, #validate

Methods inherited from DatabaseObject

#<=>, #__source, #cfg_arch, #cfg_arch?, #clone, #defer, #defined_by_condition, #initialize, #inspect, #kind, #source_line

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



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

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)


80
81
82
# File 'lib/udb/obj/portfolio.rb', line 80

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.



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

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.



85
86
87
88
89
# File 'lib/udb/obj/portfolio.rb', line 85

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?



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

def processor_kind = @data["processor_kind"]