Class: Exa::Resources::WebsetEnrichmentCollection
- Inherits:
-
Struct
- Object
- Struct
- Exa::Resources::WebsetEnrichmentCollection
- Defined in:
- lib/exa/resources/webset_enrichment_collection.rb
Overview
Represents a list of enrichments for a webset from the Exa API
This class wraps the JSON response from the GET /websets/v0/websets/id/enrichments endpoint
Instance Attribute Summary collapse
-
#data ⇒ Object
Returns the value of attribute data.
Instance Method Summary collapse
- #empty? ⇒ Boolean
-
#initialize(data:) ⇒ WebsetEnrichmentCollection
constructor
A new instance of WebsetEnrichmentCollection.
- #to_h ⇒ Object
Constructor Details
#initialize(data:) ⇒ WebsetEnrichmentCollection
Returns a new instance of WebsetEnrichmentCollection.
12 13 14 15 |
# File 'lib/exa/resources/webset_enrichment_collection.rb', line 12 def initialize(data:) super freeze end |
Instance Attribute Details
#data ⇒ Object
Returns the value of attribute data
8 9 10 |
# File 'lib/exa/resources/webset_enrichment_collection.rb', line 8 def data @data end |
Instance Method Details
#empty? ⇒ Boolean
17 18 19 |
# File 'lib/exa/resources/webset_enrichment_collection.rb', line 17 def empty? data.empty? end |
#to_h ⇒ Object
21 22 23 24 25 |
# File 'lib/exa/resources/webset_enrichment_collection.rb', line 21 def to_h { data: data } end |