Class: Exa::Responses::ResearchListResponse

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

Class Method Summary collapse

Class Method Details

.from_hash(hash) ⇒ Object



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

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