Class: SupplyChain::Slsa::ProvenanceStatement::Predicate
- Inherits:
-
Object
- Object
- SupplyChain::Slsa::ProvenanceStatement::Predicate
- Includes:
- ActiveModel::Model, CamelCaseJson
- Defined in:
- app/models/supply_chain/slsa/provenance_statement.rb
Instance Attribute Summary collapse
-
#build_definition ⇒ Object
Returns the value of attribute build_definition.
-
#run_details ⇒ Object
Returns the value of attribute run_details.
Class Method Summary collapse
Instance Method Summary collapse
Methods included from CamelCaseJson
Instance Attribute Details
#build_definition ⇒ Object
Returns the value of attribute build_definition.
157 158 159 |
# File 'app/models/supply_chain/slsa/provenance_statement.rb', line 157 def build_definition @build_definition end |
#run_details ⇒ Object
Returns the value of attribute run_details.
157 158 159 |
# File 'app/models/supply_chain/slsa/provenance_statement.rb', line 157 def run_details @run_details end |
Class Method Details
.from_build(build) ⇒ Object
143 144 145 146 147 148 149 150 151 |
# File 'app/models/supply_chain/slsa/provenance_statement.rb', line 143 def self.from_build(build) raise ArgumentError, "runner manager information not available in build" unless build.runner_manager predicate = Predicate.new predicate.build_definition = BuildDefinition.from_build(build) predicate.run_details = RunDetails.from_build(build) predicate end |
Instance Method Details
#as_json(options = nil) ⇒ Object
153 154 155 |
# File 'app/models/supply_chain/slsa/provenance_statement.rb', line 153 def as_json( = nil) deep_change_case(super) end |