Class: Omnizip::Formats::FormatSpecification

Inherits:
Lutaml::Model::Serializable
  • Object
show all
Defined in:
lib/omnizip/formats/format_spec_loader.rb

Overview

Model class representing a format specification

This class uses Lutaml::Model to provide a structured representation of format specifications loaded from YAML files.

Instance Method Summary collapse

Instance Method Details

#[](key) ⇒ Object

Get a value from the format specification

Parameters:

  • key (Symbol, String)

    The key to retrieve

Returns:

  • (Object)

    The value for the key



202
203
204
# File 'lib/omnizip/formats/format_spec_loader.rb', line 202

def [](key)
  format.public_send(key)
end

#magic_bytesArray<Integer>

Get magic bytes as an array of integers

Returns:

  • (Array<Integer>)

    The magic bytes



209
210
211
# File 'lib/omnizip/formats/format_spec_loader.rb', line 209

def magic_bytes
  format.magic_bytes
end

#nameString

Get the format name

Returns:

  • (String)

    The format name



216
217
218
# File 'lib/omnizip/formats/format_spec_loader.rb', line 216

def name
  format.name
end

#versionString

Get the format version

Returns:

  • (String)

    The format version



223
224
225
# File 'lib/omnizip/formats/format_spec_loader.rb', line 223

def version
  format.version
end