Class: Xlsxrb::Elements::RichText
- Inherits:
-
Data
- Object
- Data
- Xlsxrb::Elements::RichText
- Defined in:
- lib/xlsxrb/elements/types.rb
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.
Instance Method Summary collapse
Instance Attribute Details
#runs ⇒ Object (readonly)
Returns the value of attribute runs
30 31 32 |
# File 'lib/xlsxrb/elements/types.rb', line 30 def runs @runs end |
Instance Method Details
#to_s ⇒ Object
31 32 33 |
# File 'lib/xlsxrb/elements/types.rb', line 31 def to_s runs.map { |r| r[:text] }.join end |