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

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

Matched range of a snippet [start, end).

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(**args) ⇒ MatchRange

Returns a new instance of MatchRange.



11458
11459
11460
# File 'lib/google/apis/cloudsearch_v1/classes.rb', line 11458

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)


11451
11452
11453
# File 'lib/google/apis/cloudsearch_v1/classes.rb', line 11451

def end
  @end
end

#startFixnum

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

Returns:

  • (Fixnum)


11456
11457
11458
# File 'lib/google/apis/cloudsearch_v1/classes.rb', line 11456

def start
  @start
end

Instance Method Details

#update!(**args) ⇒ Object

Update properties of this object



11463
11464
11465
11466
# File 'lib/google/apis/cloudsearch_v1/classes.rb', line 11463

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