Class: Kagi::API::Models::Content::Error

Inherits:
Data
  • Object
show all
Defined in:
lib/kagi/api/models/content/error.rb

Overview

Models error data.

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(reference: nil) ⇒ Error

Returns a new instance of Error.



15
16
17
# File 'lib/kagi/api/models/content/error.rb', line 15

def initialize(reference: nil, **)
  super
end

Instance Attribute Details

#codeObject (readonly)

Returns the value of attribute code

Returns:

  • (Object)

    the current value of code



10
11
12
# File 'lib/kagi/api/models/content/error.rb', line 10

def code
  @code
end

#messageObject (readonly)

Returns the value of attribute message

Returns:

  • (Object)

    the current value of message



10
11
12
# File 'lib/kagi/api/models/content/error.rb', line 10

def message
  @message
end

#referenceObject (readonly)

Returns the value of attribute reference

Returns:

  • (Object)

    the current value of reference



10
11
12
# File 'lib/kagi/api/models/content/error.rb', line 10

def reference
  @reference
end

Class Method Details

.for(key_map: ERROR_MAP, **attributes) ⇒ Object



11
12
13
# File 'lib/kagi/api/models/content/error.rb', line 11

def self.for(key_map: ERROR_MAP, **attributes)
  new(**attributes.transform_keys(key_map))
end