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
-
#fill_type ⇒ PatternFill, GradientFill
The type of fill.
Instance Method Summary collapse
-
#initialize(fill_type) ⇒ Fill
constructor
Creates a new Fill object.
-
#to_xml(xml) ⇒ String
Serializes the fill.
Constructor Details
#initialize(fill_type) ⇒ Fill
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
#fill_type ⇒ PatternFill, GradientFill
The type of fill
11 12 13 |
# File 'lib/axlsx/stylesheet/fill.rb', line 11 def fill_type @fill_type end |
Instance Method Details
#to_xml(xml) ⇒ String
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 |