Class: Google::Apis::SlidesV1::TextRun

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

Overview

A TextElement kind that represents a run of text that all has the same styling.

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

Returns a new instance of TextRun



4148
4149
4150
# File 'generated/google/apis/slides_v1/classes.rb', line 4148

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

Instance Attribute Details

#contentString

The text of this run. Corresponds to the JSON property content

Returns:

  • (String)


4127
4128
4129
# File 'generated/google/apis/slides_v1/classes.rb', line 4127

def content
  @content
end

#styleGoogle::Apis::SlidesV1::TextStyle

Represents the styling that can be applied to a TextRun. If this text is contained in a shape with a parent placeholder, then these text styles may be inherited from the parent. Which text styles are inherited depend on the nesting level of lists:

  • A text run in a paragraph that is not in a list will inherit its text style from the the newline character in the paragraph at the 0 nesting level of the list inside the parent placeholder.
  • A text run in a paragraph that is in a list will inherit its text style from the newline character in the paragraph at its corresponding nesting level of the list inside the parent placeholder. Inherited text styles are represented as unset fields in this message. If text is contained in a shape without a parent placeholder, unsetting these fields will revert the style to a value matching the defaults in the Slides editor. Corresponds to the JSON property style


4146
4147
4148
# File 'generated/google/apis/slides_v1/classes.rb', line 4146

def style
  @style
end

Instance Method Details

#update!(**args) ⇒ Object

Update properties of this object



4153
4154
4155
4156
# File 'generated/google/apis/slides_v1/classes.rb', line 4153

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