Class: Omnizip::Models::CompressionOptions

Inherits:
Lutaml::Model::Serializable
  • Object
show all
Includes:
AttributeApply
Defined in:
lib/omnizip/models/compression_options.rb

Overview

Model representing compression operation options.

Serialized via lutaml-model — callers should not write hand-rolled to_h / to_json / from_json on this class. The framework provides #to_hash, #to_json, and .from_hash / .from_json automatically from the attribute declarations below.

Instance Method Summary collapse

Methods included from AttributeApply

#apply

Instance Method Details

#validate!Boolean

Validate that all set values are within their type's domain.

Returns:

  • (Boolean)

    true if valid

Raises:

  • (ArgumentError)

    if any value is invalid



46
47
48
49
50
# File 'lib/omnizip/models/compression_options.rb', line 46

def validate!
  raise ArgumentError, "level must be 0-9" unless (0..9).cover?(level)

  true
end