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

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

Overview

Models the API error.

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Attribute Details

#errorObject (readonly)

Returns the value of attribute error

Returns:

  • (Object)

    the current value of error



7
8
9
# File 'lib/kagi/api/models/error.rb', line 7

def error
  @error
end

#metaObject (readonly)

Returns the value of attribute meta

Returns:

  • (Object)

    the current value of meta



7
8
9
# File 'lib/kagi/api/models/error.rb', line 7

def meta
  @meta
end

Class Method Details

.for(**attributes) ⇒ Object



8
9
10
11
12
13
14
15
# File 'lib/kagi/api/models/error.rb', line 8

def self.for(**attributes)
  new(
    **attributes.merge!(
      meta: Content::Meta.for(**attributes[:meta]),
      error: attributes[:error].map { Content::Error.for(**it) }
    )
  )
end