Class: Exa::Responses::WebsetListResponse

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



47
48
49
50
51
52
53
54
# File 'lib/exa/responses/webset_response.rb', line 47

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