Class: Axlsx::Fill
- Inherits:
-
Object
- Object
- Axlsx::Fill
- Defined in:
- lib/axlsx/stylesheet/fill.rb
Overview
Note:
The recommended way to manage styles in your workbook is to use Styles#add_style.
The Fill is a formatting object that manages the background color, and pattern for cells.
Instance Attribute Summary (collapse)
-
- (PatternFill, GradientFill) fill_type
The type of fill.
Instance Method Summary (collapse)
-
- (Fill) initialize(fill_type)
constructor
Creates a new Fill object.
-
- (String) to_xml(xml)
Serializes the fill.
Constructor Details
- (Fill) initialize(fill_type)
Creates a new Fill object
16 17 18 |
# File 'lib/axlsx/stylesheet/fill.rb', line 16 def initialize(fill_type) self.fill_type = fill_type end |
Instance Attribute Details
- (PatternFill, GradientFill) fill_type
The type of fill
11 12 13 |
# File 'lib/axlsx/stylesheet/fill.rb', line 11 def fill_type @fill_type end |
Instance Method Details
- (String) to_xml(xml)
Serializes the fill
23 24 25 |
# File 'lib/axlsx/stylesheet/fill.rb', line 23 def to_xml(xml) xml.fill { @fill_type.to_xml(xml) } end |