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_string(str = +'')) ⇒ String
Serializes the object.
Constructor Details
#initialize(fill_type) ⇒ Fill
Creates a new Fill object
17 18 19 |
# File 'lib/axlsx/stylesheet/fill.rb', line 17 def initialize(fill_type) self.fill_type = fill_type end |
Instance Attribute Details
#fill_type ⇒ PatternFill, GradientFill
The type of fill
12 13 14 |
# File 'lib/axlsx/stylesheet/fill.rb', line 12 def fill_type @fill_type end |
Instance Method Details
#to_xml_string(str = +'')) ⇒ String
Serializes the object
24 25 26 27 28 |
# File 'lib/axlsx/stylesheet/fill.rb', line 24 def to_xml_string(str = +'') str << '<fill>' @fill_type.to_xml_string(str) str << '</fill>' end |