Class: Google::Apis::DocsV1::NamedStyle
- Inherits:
-
Object
- Object
- Google::Apis::DocsV1::NamedStyle
- 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 named style. Paragraphs in the document can inherit their TextStyle and ParagraphStyle from this named style when they have the same named style type.
Instance Attribute Summary collapse
-
#named_style_type ⇒ String
The type of this named style.
-
#paragraph_style ⇒ Google::Apis::DocsV1::ParagraphStyle
Styles that apply to a whole paragraph.
-
#text_style ⇒ Google::Apis::DocsV1::TextStyle
Represents the styling that can be applied to text.
Instance Method Summary collapse
-
#initialize(**args) ⇒ NamedStyle
constructor
A new instance of NamedStyle.
-
#update!(**args) ⇒ Object
Update properties of this object.
Methods included from Core::JsonObjectSupport
Methods included from Core::Hashable
Constructor Details
#initialize(**args) ⇒ NamedStyle
Returns a new instance of NamedStyle
2368 2369 2370 |
# File 'generated/google/apis/docs_v1/classes.rb', line 2368 def initialize(**args) update!(**args) end |
Instance Attribute Details
#named_style_type ⇒ String
The type of this named style.
Corresponds to the JSON property namedStyleType
2330 2331 2332 |
# File 'generated/google/apis/docs_v1/classes.rb', line 2330 def named_style_type @named_style_type end |
#paragraph_style ⇒ Google::Apis::DocsV1::ParagraphStyle
Styles that apply to a whole paragraph. Inherited paragraph styles are represented as unset fields in this message. A paragraph style's parent depends on where the paragraph style is defined:
- The ParagraphStyle on a Paragraph inherits from the paragraph's corresponding named style type.
- The ParagraphStyle on a named style inherits from the normal text named style.
- The ParagraphStyle of the normal text named style inherits from the default paragraph style in the Docs editor.
- The ParagraphStyle on a Paragraph
element that is contained in a table may inherit its paragraph style from
the table style.
If the paragraph style does not inherit from a parent, unsetting fields will
revert the style to a value matching the defaults in the Docs editor.
Corresponds to the JSON property
paragraphStyle
2348 2349 2350 |
# File 'generated/google/apis/docs_v1/classes.rb', line 2348 def paragraph_style @paragraph_style end |
#text_style ⇒ Google::Apis::DocsV1::TextStyle
Represents the styling that can be applied to text. Inherited text styles are represented as unset fields in this message. A text style's parent depends on where the text style is defined:
- The TextStyle of text in a Paragraph inherits from the paragraph's corresponding named style type.
- The TextStyle on a named style inherits from the normal text named style.
- The TextStyle of the normal text named style inherits from the default text style in the Docs editor.
- The TextStyle on a Paragraph element
that is contained in a table may inherit its text style from the table
style.
If the text style does not inherit from a parent, unsetting fields will
revert the style to a value matching the defaults in the Docs editor.
Corresponds to the JSON property
textStyle
2366 2367 2368 |
# File 'generated/google/apis/docs_v1/classes.rb', line 2366 def text_style @text_style end |
Instance Method Details
#update!(**args) ⇒ Object
Update properties of this object
2373 2374 2375 2376 2377 |
# File 'generated/google/apis/docs_v1/classes.rb', line 2373 def update!(**args) @named_style_type = args[:named_style_type] if args.key?(:named_style_type) @paragraph_style = args[:paragraph_style] if args.key?(:paragraph_style) @text_style = args[:text_style] if args.key?(:text_style) end |