Class: Lutaml::Model::UnknownTypeError

Inherits:
Error
  • Object
show all
Defined in:
lib/lutaml/model/error/unknown_type_error.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(type_name, context_id: nil, available_types: nil) ⇒ UnknownTypeError

Create a new UnknownTypeError.

Parameters:

  • type_name (Symbol, String)

    The name of the unknown type

  • context_id (Symbol, nil) (defaults to: nil)

    Optional context ID where type was looked up

  • available_types (Array<Symbol>, nil) (defaults to: nil)

    Optional list of available types



11
12
13
14
15
16
17
18
# File 'lib/lutaml/model/error/unknown_type_error.rb', line 11

def initialize(type_name, context_id: nil, available_types: nil)
  @type_name = type_name
  @context_id = context_id
  @available_types = available_types

  message = build_message
  super(message)
end

Instance Attribute Details

#available_typesObject (readonly)

Returns the value of attribute available_types.



4
5
6
# File 'lib/lutaml/model/error/unknown_type_error.rb', line 4

def available_types
  @available_types
end

#context_idObject (readonly)

Returns the value of attribute context_id.



4
5
6
# File 'lib/lutaml/model/error/unknown_type_error.rb', line 4

def context_id
  @context_id
end

#type_nameObject (readonly)

Returns the value of attribute type_name.



4
5
6
# File 'lib/lutaml/model/error/unknown_type_error.rb', line 4

def type_name
  @type_name
end