Class: Google::Apis::DocsV1::StructuralElement

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
more...

Overview

A StructuralElement describes content that provides structure to 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) ⇒ StructuralElement

Returns a new instance of StructuralElement

[View source]

4024
4025
4026
# File 'generated/google/apis/docs_v1/classes.rb', line 4024

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

Instance Attribute Details

#end_indexFixnum

The zero-based end index of this structural element, exclusive, in Unicode code units of the UTF-16 encoding. Unicode code units of the UTF-16 encoding means that surrogate pairs consume two indices. For example, the "GRINNING FACE" emoji would be represented as "\uD83D\uDE00" and would consume two indices. Corresponds to the JSON property endIndex

Returns:

  • (Fixnum)

3984
3985
3986
# File 'generated/google/apis/docs_v1/classes.rb', line 3984

def end_index
  @end_index
end

#paragraphGoogle::Apis::DocsV1::Paragraph

A StructuralElement representing a paragraph. A paragraph is a range of content that is terminated with a newline character. Corresponds to the JSON property paragraph


3991
3992
3993
# File 'generated/google/apis/docs_v1/classes.rb', line 3991

def paragraph
  @paragraph
end

#section_breakGoogle::Apis::DocsV1::SectionBreak

A StructuralElement representing a section break. A section is a range of content which has the same SectionStyle. A section break represents the start of a new section, and the section style applies to the section after the section break. The document body always begins with a section break. Corresponds to the JSON property sectionBreak


4001
4002
4003
# File 'generated/google/apis/docs_v1/classes.rb', line 4001

def section_break
  @section_break
end

#start_indexFixnum

The zero-based start index of this structural element, in Unicode code units of the UTF-16 encoding. Unicode code units of the UTF-16 encoding means that surrogate pairs consume two indices. For example, the "GRINNING FACE" emoji would be represented as "\uD83D\uDE00" and would consume two indices. Corresponds to the JSON property startIndex

Returns:

  • (Fixnum)

4010
4011
4012
# File 'generated/google/apis/docs_v1/classes.rb', line 4010

def start_index
  @start_index
end

#tableGoogle::Apis::DocsV1::Table

A StructuralElement representing a table. Corresponds to the JSON property table


4016
4017
4018
# File 'generated/google/apis/docs_v1/classes.rb', line 4016

def table
  @table
end

#table_of_contentsGoogle::Apis::DocsV1::TableOfContents

A StructuralElement representing a table of contents. Corresponds to the JSON property tableOfContents


4022
4023
4024
# File 'generated/google/apis/docs_v1/classes.rb', line 4022

def table_of_contents
  @table_of_contents
end

Instance Method Details

#update!(**args) ⇒ Object

Update properties of this object

[View source]

4029
4030
4031
4032
4033
4034
4035
4036
# File 'generated/google/apis/docs_v1/classes.rb', line 4029

def update!(**args)
  @end_index = args[:end_index] if args.key?(:end_index)
  @paragraph = args[:paragraph] if args.key?(:paragraph)
  @section_break = args[:section_break] if args.key?(:section_break)
  @start_index = args[:start_index] if args.key?(:start_index)
  @table = args[:table] if args.key?(:table)
  @table_of_contents = args[:table_of_contents] if args.key?(:table_of_contents)
end
x

Warning: This is not the latest release.



Privacy · Terms