Class: Udb::PortfolioExtensionRequirement
- Inherits:
-
Object
- Object
- Udb::PortfolioExtensionRequirement
- Extended by:
- Forwardable, T::Sig
- Includes:
- Comparable
- Defined in:
- lib/udb/obj/portfolio.rb
Instance Attribute Summary collapse
-
#ext_req ⇒ Object
readonly
Returns the value of attribute ext_req.
-
#note ⇒ Object
readonly
Returns the value of attribute note.
-
#presence ⇒ Object
readonly
Returns the value of attribute presence.
-
#req_id ⇒ Object
readonly
Returns the value of attribute req_id.
Instance Method Summary collapse
- #<=>(other) ⇒ Object
-
#initialize(name, requirements, arch:, note: nil, req_id: nil, presence: nil) ⇒ PortfolioExtensionRequirement
constructor
A new instance of PortfolioExtensionRequirement.
Constructor Details
#initialize(name, requirements, arch:, note: nil, req_id: nil, presence: nil) ⇒ PortfolioExtensionRequirement
Returns a new instance of PortfolioExtensionRequirement.
45 46 47 48 49 50 |
# File 'lib/udb/obj/portfolio.rb', line 45 def initialize(name, requirements, arch:, note: nil, req_id: nil, presence: nil) @ext_req = arch.extension_requirement(name, requirements) @note = note @req_id = req_id @presence = presence end |
Instance Attribute Details
#ext_req ⇒ Object (readonly)
Returns the value of attribute ext_req.
33 34 35 |
# File 'lib/udb/obj/portfolio.rb', line 33 def ext_req @ext_req end |
#note ⇒ Object (readonly)
Returns the value of attribute note.
33 34 35 |
# File 'lib/udb/obj/portfolio.rb', line 33 def note @note end |
#presence ⇒ Object (readonly)
Returns the value of attribute presence.
33 34 35 |
# File 'lib/udb/obj/portfolio.rb', line 33 def presence @presence end |
#req_id ⇒ Object (readonly)
Returns the value of attribute req_id.
33 34 35 |
# File 'lib/udb/obj/portfolio.rb', line 33 def req_id @req_id end |
Instance Method Details
#<=>(other) ⇒ Object
53 54 55 56 57 58 59 60 |
# File 'lib/udb/obj/portfolio.rb', line 53 def <=>(other) case other when PortfolioExtensionRequirement @ext_req <=> other.ext_req when ExtensionRequirement @ext_req <=> other end end |