Class: Exa::Resources::ResearchList
- Inherits:
-
Struct
- Object
- Struct
- Exa::Resources::ResearchList
- Defined in:
- lib/exa/resources/research_list.rb
Instance Attribute Summary collapse
-
#data ⇒ Object
Returns the value of attribute data.
-
#has_more ⇒ Object
Returns the value of attribute has_more.
-
#next_cursor ⇒ Object
Returns the value of attribute next_cursor.
Instance Method Summary collapse
-
#initialize(data:, has_more:, next_cursor: nil) ⇒ ResearchList
constructor
A new instance of ResearchList.
- #to_h ⇒ Object
Constructor Details
#initialize(data:, has_more:, next_cursor: nil) ⇒ ResearchList
Returns a new instance of ResearchList.
4 5 6 7 |
# File 'lib/exa/resources/research_list.rb', line 4 def initialize(data:, has_more:, next_cursor: nil) super freeze end |
Instance Attribute Details
#data ⇒ Object
Returns the value of attribute data
3 4 5 |
# File 'lib/exa/resources/research_list.rb', line 3 def data @data end |
#has_more ⇒ Object
Returns the value of attribute has_more
3 4 5 |
# File 'lib/exa/resources/research_list.rb', line 3 def has_more @has_more end |
#next_cursor ⇒ Object
Returns the value of attribute next_cursor
3 4 5 |
# File 'lib/exa/resources/research_list.rb', line 3 def next_cursor @next_cursor end |
Instance Method Details
#to_h ⇒ Object
9 10 11 12 13 14 15 |
# File 'lib/exa/resources/research_list.rb', line 9 def to_h { data: data.map { |item| item.respond_to?(:to_h) ? item.to_h : item }, has_more: has_more, next_cursor: next_cursor } end |