Class: Lutaml::Xsd::TypeIndexEntry

Inherits:
Model::Serializable
  • Object
show all
Defined in:
lib/lutaml/xsd/type_index_entry.rb

Overview

Represents a single entry in the type index for serialization

Class Method Summary collapse

Class Method Details

.from_index_info(clark_key, info) ⇒ TypeIndexEntry

Create from type index info hash

Parameters:

  • clark_key (String)

    Clark notation key

  • info (Hash)

    Type information hash

Returns:



25
26
27
28
29
30
31
32
33
# File 'lib/lutaml/xsd/type_index_entry.rb', line 25

def self.from_index_info(clark_key, info)
  new(
    clark_key: clark_key,
    type_category: info[:type].to_s,
    namespace: info[:namespace],
    local_name: info[:definition]&.name,
    schema_file: info[:schema_file],
  )
end