Class: Google::Apis::CloudsearchV1::MatchRange

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

Matched range of a snippet [start, end).

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) ⇒ MatchRange

Returns a new instance of MatchRange.



2279
2280
2281
# File 'generated/google/apis/cloudsearch_v1/classes.rb', line 2279

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

Instance Attribute Details

#endFixnum

End of the match in the snippet. Corresponds to the JSON property end

Returns:

  • (Fixnum)


2272
2273
2274
# File 'generated/google/apis/cloudsearch_v1/classes.rb', line 2272

def end
  @end
end

#startFixnum

Starting position of the match in the snippet. Corresponds to the JSON property start

Returns:

  • (Fixnum)


2277
2278
2279
# File 'generated/google/apis/cloudsearch_v1/classes.rb', line 2277

def start
  @start
end

Instance Method Details

#update!(**args) ⇒ Object

Update properties of this object



2284
2285
2286
2287
# File 'generated/google/apis/cloudsearch_v1/classes.rb', line 2284

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