Class: Exa::Responses::EventListResponse

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

Class Method Summary collapse

Class Method Details

.from_hash(hash) ⇒ Object



33
34
35
36
37
38
39
40
# File 'lib/exa/responses/event_response.rb', line 33

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