Class: Google::Apis::CloudsearchV1::Snippet

Inherits:
Object
  • Object
show all
Includes:
Google::Apis::Core::Hashable, Google::Apis::Core::JsonObjectSupport
Defined in:
generated/google/apis/cloudsearch_v1/classes.rb,
generated/google/apis/cloudsearch_v1/representations.rb,
generated/google/apis/cloudsearch_v1/representations.rb

Overview

Snippet of the search result, which summarizes the content of the resulting page.

Instance Attribute Summary collapse

Instance Method Summary collapse

Methods included from Google::Apis::Core::JsonObjectSupport

#to_json

Methods included from Google::Apis::Core::Hashable

process_value, #to_h

Constructor Details

#initialize(**args) ⇒ Snippet

Returns a new instance of Snippet.



4311
4312
4313
# File 'generated/google/apis/cloudsearch_v1/classes.rb', line 4311

def initialize(**args)
   update!(**args)
end

Instance Attribute Details

#match_rangesArray<Google::Apis::CloudsearchV1::MatchRange>

The matched ranges in the snippet. Corresponds to the JSON property matchRanges



4302
4303
4304
# File 'generated/google/apis/cloudsearch_v1/classes.rb', line 4302

def match_ranges
  @match_ranges
end

#snippetString

The snippet of the document. The snippet of the document. May contain escaped HTML character that should be unescaped prior to rendering. Corresponds to the JSON property snippet

Returns:

  • (String)


4309
4310
4311
# File 'generated/google/apis/cloudsearch_v1/classes.rb', line 4309

def snippet
  @snippet
end

Instance Method Details

#update!(**args) ⇒ Object

Update properties of this object



4316
4317
4318
4319
# File 'generated/google/apis/cloudsearch_v1/classes.rb', line 4316

def update!(**args)
  @match_ranges = args[:match_ranges] if args.key?(:match_ranges)
  @snippet = args[:snippet] if args.key?(:snippet)
end