Class: CertModel::Requirement
- Inherits:
-
ArchDefObject
- Object
- ArchDefObject
- CertModel::Requirement
- Defined in:
- lib/arch_obj_models/certificate.rb
Overview
Holds extra requirements not associated with extensions or their parameters.
Instance Method Summary collapse
- #description ⇒ Object
-
#initialize(data, arch_def) ⇒ Requirement
constructor
A new instance of Requirement.
- #when ⇒ Object
- #when_pretty ⇒ Object
Constructor Details
#initialize(data, arch_def) ⇒ Requirement
Returns a new instance of Requirement.
63 64 65 66 |
# File 'lib/arch_obj_models/certificate.rb', line 63 def initialize(data, arch_def) super(data) @arch_def = arch_def end |
Instance Method Details
#description ⇒ Object
68 |
# File 'lib/arch_obj_models/certificate.rb', line 68 def description = @data["description"] |
#when ⇒ Object
70 |
# File 'lib/arch_obj_models/certificate.rb', line 70 def when = @data["when"] |
#when_pretty ⇒ Object
72 73 74 75 76 77 78 79 80 81 82 83 84 85 |
# File 'lib/arch_obj_models/certificate.rb', line 72 def when_pretty @data["when"].keys.map do |key| case key when "xlen" "XLEN == #{@data["when"]["xlen"]}" when "param" @data["when"]["param"].map do |param_name, param_value| "Parameter #{param_name} == #{param_value}" end else raise "TODO: when type #{key} not implemented" end end.flatten.join(" and ") end |