Class: Xlsxrb::Elements::RichText
- Inherits:
-
Data
- Object
- Data
- Xlsxrb::Elements::RichText
- 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
-
#runs ⇒ Object
readonly
Returns the value of attribute runs.
Class Method Summary collapse
Instance Method Summary collapse
Instance Attribute Details
#runs ⇒ Object (readonly)
Returns the value of attribute runs
36 37 38 |
# File 'lib/xlsxrb/elements/types.rb', line 36 def runs @runs end |
Class Method Details
.members ⇒ [ :runs ]
69 |
# File 'sig/generated/xlsxrb/elements/types.rbs', line 69
def self.members: () -> [ :runs ]
|
.new(runs) ⇒ instance .new(runs:) ⇒ 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 ]
71 |
# File 'sig/generated/xlsxrb/elements/types.rbs', line 71
def members: () -> [ :runs ]
|
#to_s ⇒ Object
37 38 39 |
# File 'lib/xlsxrb/elements/types.rb', line 37 def to_s runs.map { |r| r[:text] }.join end |