Class: Google::Apis::ChatV1::GoogleAppsCardV1TextParagraph

Inherits:
Object
  • Object
show all
Includes:
Google::Apis::Core::Hashable, Google::Apis::Core::JsonObjectSupport
Defined in:
lib/google/apis/chat_v1/classes.rb,
lib/google/apis/chat_v1/representations.rb,
lib/google/apis/chat_v1/representations.rb

Overview

A paragraph of text that supports formatting. For an example in Google Chat apps, see Add a paragraph of formatted text. For more information about formatting text, see Formatting text in Google Chat apps and Formatting text in Google Workspace Add-ons. Google Workspace Add-ons and Chat apps:

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(**args) ⇒ GoogleAppsCardV1TextParagraph

Returns a new instance of GoogleAppsCardV1TextParagraph.



3221
3222
3223
# File 'lib/google/apis/chat_v1/classes.rb', line 3221

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

Instance Attribute Details

#max_linesFixnum

The maximum number of lines of text that are displayed in the widget. If the text exceeds the specified maximum number of lines, the excess content is concealed behind a show more button. If the text is equal or shorter than the specified maximum number of lines, a show more button isn't displayed. The default value is 0, in which case all context is displayed. Negative values are ignored. Google Chat apps: Corresponds to the JSON property maxLines

Returns:

  • (Fixnum)


3214
3215
3216
# File 'lib/google/apis/chat_v1/classes.rb', line 3214

def max_lines
  @max_lines
end

#textString

The text that's shown in the widget. Corresponds to the JSON property text

Returns:

  • (String)


3219
3220
3221
# File 'lib/google/apis/chat_v1/classes.rb', line 3219

def text
  @text
end

Instance Method Details

#update!(**args) ⇒ Object

Update properties of this object



3226
3227
3228
3229
# File 'lib/google/apis/chat_v1/classes.rb', line 3226

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