class Axlsx::RichText
Attributes
cell[R]
Public Class Methods
new(text = nil, options={}) { |self| ... }
click to toggle source
Calls superclass method
Axlsx::SimpleTypedList::new
# File lib/axlsx/workbook/worksheet/rich_text.rb, line 3 def initialize(text = nil, options={}) super(RichTextRun) add_run(text, options) unless text.nil? yield self if block_given? end
Public Instance Methods
add_run(text, options={})
click to toggle source
# File lib/axlsx/workbook/worksheet/rich_text.rb, line 22 def add_run(text, options={}) self << RichTextRun.new(text, options) end
autowidth()
click to toggle source
# File lib/axlsx/workbook/worksheet/rich_text.rb, line 16 def autowidth widtharray = [0] # Are arrays the best way of solving this problem? each { |run| run.autowidth(widtharray) } widtharray.max end
cell=(cell)
click to toggle source
# File lib/axlsx/workbook/worksheet/rich_text.rb, line 11 def cell=(cell) @cell = cell each { |run| run.cell = cell } end
runs()
click to toggle source
# File lib/axlsx/workbook/worksheet/rich_text.rb, line 26 def runs self end
to_xml_string(str='')
click to toggle source
# File lib/axlsx/workbook/worksheet/rich_text.rb, line 30 def to_xml_string(str='') each{ |run| run.to_xml_string(str) } str end