Class: Omnizip::Models::AlgorithmMetadata

Inherits:
Lutaml::Model::Serializable
  • Object
show all
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

Instance Method Details

#apply(attributes) ⇒ self

Apply a hash of attributes (whitelisted to declared attributes).

Parameters:

  • attributes (Hash{Symbol=>Object})

Returns:

  • (self)


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