Class: Xlsxrb::Elements::RichText

Inherits:
Data
  • Object
show all
Defined in:
lib/xlsxrb/elements/types.rb,
sig/generated/xlsxrb/elements/types.rbs

Overview

Represents a rich text string with formatting runs. runs: array of hashes, each with :text and optional :font (hash of font properties). Font properties: :bold, :italic, :underline, :sz, :color, :name

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

Instance Attribute Details

#runsObject (readonly)

Returns the value of attribute runs

Returns:

  • (Object)

    the current value of runs



36
37
38
# File 'lib/xlsxrb/elements/types.rb', line 36

def runs
  @runs
end

Class Method Details

.members[ :runs ]

Returns:

  • ([ :runs ])


69
# File 'sig/generated/xlsxrb/elements/types.rbs', line 69

def self.members: () -> [ :runs ]

.new(runs) ⇒ instance .new(runs:) ⇒ instance

Overloads:

  • .new(runs) ⇒ instance

    Parameters:

    • runs (Object)

    Returns:

    • (instance)
  • .new(runs:) ⇒ instance

    Parameters:

    • runs: (Object)

    Returns:

    • (instance)


66
67
# File 'sig/generated/xlsxrb/elements/types.rbs', line 66

def self.new: (untyped runs) -> instance
| (runs: untyped) -> instance

Instance Method Details

#members[ :runs ]

Returns:

  • ([ :runs ])


71
# File 'sig/generated/xlsxrb/elements/types.rbs', line 71

def members: () -> [ :runs ]

#to_sObject



37
38
39
# File 'lib/xlsxrb/elements/types.rb', line 37

def to_s
  runs.map { |r| r[:text] }.join
end