Class: Exa::Resources::WebsetEnrichment
- Inherits:
-
Struct
- Object
- Struct
- Exa::Resources::WebsetEnrichment
- Defined in:
- lib/exa/resources/webset_enrichment.rb
Overview
Represents a webset enrichment from the Exa API
An enrichment extracts specific data from web entities in a webset.
Instance Attribute Summary collapse
-
#created_at ⇒ Object
Returns the value of attribute created_at.
-
#description ⇒ Object
Returns the value of attribute description.
-
#format ⇒ Object
Returns the value of attribute format.
-
#id ⇒ Object
Returns the value of attribute id.
-
#instructions ⇒ Object
Returns the value of attribute instructions.
-
#metadata ⇒ Object
Returns the value of attribute metadata.
-
#object ⇒ Object
Returns the value of attribute object.
-
#options ⇒ Object
Returns the value of attribute options.
-
#status ⇒ Object
Returns the value of attribute status.
-
#title ⇒ Object
Returns the value of attribute title.
-
#updated_at ⇒ Object
Returns the value of attribute updated_at.
-
#webset_id ⇒ Object
Returns the value of attribute webset_id.
Instance Method Summary collapse
- #completed? ⇒ Boolean
-
#initialize(id:, object:, status:, webset_id: nil, title: nil, description: nil, format: nil, options: nil, instructions: nil, metadata: nil, created_at: nil, updated_at: nil) ⇒ WebsetEnrichment
constructor
A new instance of WebsetEnrichment.
- #pending? ⇒ Boolean
- #running? ⇒ Boolean
- #to_h ⇒ Object
Constructor Details
#initialize(id:, object:, status:, webset_id: nil, title: nil, description: nil, format: nil, options: nil, instructions: nil, metadata: nil, created_at: nil, updated_at: nil) ⇒ WebsetEnrichment
Returns a new instance of WebsetEnrichment.
23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 |
# File 'lib/exa/resources/webset_enrichment.rb', line 23 def initialize( id:, object:, status:, webset_id: nil, title: nil, description: nil, format: nil, options: nil, instructions: nil, metadata: nil, created_at: nil, updated_at: nil ) super freeze end |
Instance Attribute Details
#created_at ⇒ Object
Returns the value of attribute created_at
8 9 10 |
# File 'lib/exa/resources/webset_enrichment.rb', line 8 def created_at @created_at end |
#description ⇒ Object
Returns the value of attribute description
8 9 10 |
# File 'lib/exa/resources/webset_enrichment.rb', line 8 def description @description end |
#format ⇒ Object
Returns the value of attribute format
8 9 10 |
# File 'lib/exa/resources/webset_enrichment.rb', line 8 def format @format end |
#id ⇒ Object
Returns the value of attribute id
8 9 10 |
# File 'lib/exa/resources/webset_enrichment.rb', line 8 def id @id end |
#instructions ⇒ Object
Returns the value of attribute instructions
8 9 10 |
# File 'lib/exa/resources/webset_enrichment.rb', line 8 def instructions @instructions end |
#metadata ⇒ Object
Returns the value of attribute metadata
8 9 10 |
# File 'lib/exa/resources/webset_enrichment.rb', line 8 def end |
#object ⇒ Object
Returns the value of attribute object
8 9 10 |
# File 'lib/exa/resources/webset_enrichment.rb', line 8 def object @object end |
#options ⇒ Object
Returns the value of attribute options
8 9 10 |
# File 'lib/exa/resources/webset_enrichment.rb', line 8 def end |
#status ⇒ Object
Returns the value of attribute status
8 9 10 |
# File 'lib/exa/resources/webset_enrichment.rb', line 8 def status @status end |
#title ⇒ Object
Returns the value of attribute title
8 9 10 |
# File 'lib/exa/resources/webset_enrichment.rb', line 8 def title @title end |
#updated_at ⇒ Object
Returns the value of attribute updated_at
8 9 10 |
# File 'lib/exa/resources/webset_enrichment.rb', line 8 def updated_at @updated_at end |
#webset_id ⇒ Object
Returns the value of attribute webset_id
8 9 10 |
# File 'lib/exa/resources/webset_enrichment.rb', line 8 def webset_id @webset_id end |
Instance Method Details
#completed? ⇒ Boolean
49 50 51 |
# File 'lib/exa/resources/webset_enrichment.rb', line 49 def completed? status == "completed" end |
#pending? ⇒ Boolean
41 42 43 |
# File 'lib/exa/resources/webset_enrichment.rb', line 41 def pending? status == "pending" end |
#running? ⇒ Boolean
45 46 47 |
# File 'lib/exa/resources/webset_enrichment.rb', line 45 def running? status == "running" end |
#to_h ⇒ Object
53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 |
# File 'lib/exa/resources/webset_enrichment.rb', line 53 def to_h { id: id, object: object, status: status, webset_id: webset_id, title: title, description: description, format: format, options: , instructions: instructions, metadata: , created_at: created_at, updated_at: updated_at }.compact end |