Class: Firecrawl::Models::HighlightsFormat

Inherits:
Object
  • Object
show all
Defined in:
lib/firecrawl/models/query_format.rb

Overview

Highlights format for extracting direct highlights from page content.

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(query:) ⇒ HighlightsFormat

Returns a new instance of HighlightsFormat.



29
30
31
# File 'lib/firecrawl/models/query_format.rb', line 29

def initialize(query:)
  @query = query
end

Instance Attribute Details

#queryObject (readonly)

Returns the value of attribute query.



27
28
29
# File 'lib/firecrawl/models/query_format.rb', line 27

def query
  @query
end

Instance Method Details

#to_hObject



33
34
35
36
37
38
# File 'lib/firecrawl/models/query_format.rb', line 33

def to_h
  {
    "type" => "highlights",
    "query" => query,
  }
end

#typeObject



40
41
42
# File 'lib/firecrawl/models/query_format.rb', line 40

def type
  "highlights"
end