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

Inherits:
Object
  • Object
show all
Includes:
Google::Apis::Core::Hashable, Google::Apis::Core::JsonObjectSupport
Defined in:
lib/google/apis/cloudsearch_v1/classes.rb,
lib/google/apis/cloudsearch_v1/representations.rb,
lib/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

Constructor Details

#initialize(**args) ⇒ Snippet

Returns a new instance of Snippet.



7342
7343
7344
# File 'lib/google/apis/cloudsearch_v1/classes.rb', line 7342

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



7334
7335
7336
# File 'lib/google/apis/cloudsearch_v1/classes.rb', line 7334

def match_ranges
  @match_ranges
end

#snippetString

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)


7340
7341
7342
# File 'lib/google/apis/cloudsearch_v1/classes.rb', line 7340

def snippet
  @snippet
end

Instance Method Details

#update!(**args) ⇒ Object

Update properties of this object



7347
7348
7349
7350
# File 'lib/google/apis/cloudsearch_v1/classes.rb', line 7347

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