Class: Google::Apis::DocsV1::Range

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

Overview

Specifies a contiguous range of text.

Instance Attribute Summary collapse

Instance Method Summary collapse

Methods included from Core::JsonObjectSupport

#to_json

Methods included from Core::Hashable

process_value, #to_h

Constructor Details

#initialize(**args) ⇒ Range

Returns a new instance of Range



3488
3489
3490
# File 'generated/google/apis/docs_v1/classes.rb', line 3488

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

Instance Attribute Details

#end_indexFixnum

The zero-based end index of this range, exclusive, in Unicode code units of the UTF-16 encoding. In all current uses, an end index must be provided. This field is an Int32Value in order to accommodate future use cases with open-ended ranges. Corresponds to the JSON property endIndex

Returns:

  • (Fixnum)


3472
3473
3474
# File 'generated/google/apis/docs_v1/classes.rb', line 3472

def end_index
  @end_index
end

#segment_idString

The ID of the header, footer or footnote that this range is contained in. An empty segment ID signifies the document's body. Corresponds to the JSON property segmentId

Returns:

  • (String)


3478
3479
3480
# File 'generated/google/apis/docs_v1/classes.rb', line 3478

def segment_id
  @segment_id
end

#start_indexFixnum

The zero-based start index of this range, in Unicode code units of the UTF-16 encoding. In all current uses, a start index must be provided. This field is an Int32Value in order to accommodate future use cases with open-ended ranges. Corresponds to the JSON property startIndex

Returns:

  • (Fixnum)


3486
3487
3488
# File 'generated/google/apis/docs_v1/classes.rb', line 3486

def start_index
  @start_index
end

Instance Method Details

#update!(**args) ⇒ Object

Update properties of this object



3493
3494
3495
3496
3497
# File 'generated/google/apis/docs_v1/classes.rb', line 3493

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