class Xlsxrb::StyleLog
The order in which the styles of an {Xlsxrb.build} workbook are defined, shared by the workbook builder and its sheet builders. A row records the clock when it is added, so that it uses the definitions made before it, as a row written by {StreamWriter} does.
@api private
Attributes
clock
[R]
Integer
Number of definitions so far.
definitions
[R]
Hash[String, Array[[Integer, StyleBuilder]]]
Each name’s definitions, as [clock, builder] pairs in the order they were made.
Public Class Methods
() → void
Source
# File lib/xlsxrb/style_builder.rb, line 1616 def initialize @clock = 0 @definitions = {} end
Public Instance Methods
(String name, StyleBuilder builder) → void
Source
# File lib/xlsxrb/style_builder.rb, line 1622 def record(name, builder) @clock += 1 (@definitions[name] ||= []) << [@clock, builder] end