Class: MistApi::UnknownEvent

Inherits:
Object
  • Object
show all
Defined in:
lib/mist_api/events/unknown_event.rb

Overview

Represents an unrecognized or unsupported event during processing.

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(errors) ⇒ UnknownEvent

Initialize with the errors that caused the failure.

Parameters:

  • errors (Array<String>)

    A list of error messages describing the reasons for verification failure.



14
15
16
# File 'lib/mist_api/events/unknown_event.rb', line 14

def initialize(errors)
  @errors = errors
end

Instance Attribute Details

#errorsArray<String> (readonly)

Returns:

  • (Array<String>)


10
11
12
# File 'lib/mist_api/events/unknown_event.rb', line 10

def errors
  @errors
end

Instance Method Details

#inspectString

Provides a debugging-friendly string with detailed object information.

Returns:

  • (String)


27
28
29
30
# File 'lib/mist_api/events/unknown_event.rb', line 27

def inspect
  class_name = self.class.name.split('::').last
  "<#{class_name} errors: #{@errors.inspect}>"
end

#to_sString

Provides a user-friendly string representation of the failure.

Returns:

  • (String)


20
21
22
23
# File 'lib/mist_api/events/unknown_event.rb', line 20

def to_s
  class_name = self.class.name.split('::').last
  "<#{class_name} errors: #{@errors}>"
end