Class: Omnizip::Models::AlgorithmMetadata
- Inherits:
-
Lutaml::Model::Serializable
- Object
- Lutaml::Model::Serializable
- Omnizip::Models::AlgorithmMetadata
- Defined in:
- lib/omnizip/models/algorithm_metadata.rb
Overview
Metadata describing a compression algorithm.
Serialized via lutaml-model — no hand-rolled to_h / to_json.
Instance Method Summary collapse
-
#apply(attributes) ⇒ self
Apply a hash of attributes (whitelisted to declared attributes).
Instance Method Details
#apply(attributes) ⇒ self
Apply a hash of attributes (whitelisted to declared attributes).
37 38 39 40 41 42 43 |
# File 'lib/omnizip/models/algorithm_metadata.rb', line 37 def apply(attributes) self.class.attributes.each do |attr| name = attr.name public_send("#{name}=", attributes[name]) if attributes.key?(name) end self end |