Class: Kagi::API::Models::Summary

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

Overview

Models the API payload.

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Attribute Details

#dataObject (readonly)

Returns the value of attribute data

Returns:

  • (Object)

    the current value of data



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

def data
  @data
end

#metaObject (readonly)

Returns the value of attribute meta

Returns:

  • (Object)

    the current value of meta



7
8
9
# File 'lib/kagi/api/models/summary.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/summary.rb', line 8

def self.for(**attributes)
  new(
    **attributes.merge!(
      meta: Content::Meta.for(**attributes[:meta]),
      data: Content::Summary[**attributes[:data]]
    )
  )
end