Class: Google::Apis::DocsV1::Location

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

A particular location in the document.

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

Returns a new instance of Location.



2624
2625
2626
# File 'generated/google/apis/docs_v1/classes.rb', line 2624

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

Instance Attribute Details

#indexFixnum

The zero-based index, in UTF-16 code units. The index is relative to the beginning of the segment specified by segment_id. Corresponds to the JSON property index

Returns:

  • (Fixnum)


2616
2617
2618
# File 'generated/google/apis/docs_v1/classes.rb', line 2616

def index
  @index
end

#segment_idString

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

Returns:

  • (String)


2622
2623
2624
# File 'generated/google/apis/docs_v1/classes.rb', line 2622

def segment_id
  @segment_id
end

Instance Method Details

#update!(**args) ⇒ Object

Update properties of this object



2629
2630
2631
2632
# File 'generated/google/apis/docs_v1/classes.rb', line 2629

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