Class: Exa::Responses::WebsetItemListResponse

Inherits:
T::Struct
  • Object
show all
Defined in:
lib/exa/responses/webset_response.rb

Class Method Summary collapse

Class Method Details

.from_hash(hash) ⇒ Object



93
94
95
96
97
98
99
100
# File 'lib/exa/responses/webset_response.rb', line 93

def self.from_hash(hash)
  sym = Helpers.symbolize_keys(hash)
  new(
    data: Array(sym[:data]).map { WebsetItem.from_hash(_1) },
    has_more: sym[:hasMore],
    next_cursor: sym[:nextCursor]
  )
end