Class: OOXL::CellStyleReference
- Inherits:
-
Object
- Object
- OOXL::CellStyleReference
- Defined in:
- lib/ooxl/xl_objects/cell_style_reference.rb
Instance Attribute Summary collapse
-
#fill_id ⇒ Object
Returns the value of attribute fill_id.
-
#font_id ⇒ Object
Returns the value of attribute font_id.
-
#id ⇒ Object
Returns the value of attribute id.
-
#number_formatting_id ⇒ Object
Returns the value of attribute number_formatting_id.
Class Method Summary collapse
Instance Method Summary collapse
-
#initialize(**attrs) ⇒ CellStyleReference
constructor
A new instance of CellStyleReference.
Constructor Details
#initialize(**attrs) ⇒ CellStyleReference
Returns a new instance of CellStyleReference.
4 5 6 |
# File 'lib/ooxl/xl_objects/cell_style_reference.rb', line 4 def initialize(**attrs) attrs.each { |property, value| send("#{property}=", value)} end |
Instance Attribute Details
#fill_id ⇒ Object
Returns the value of attribute fill_id.
3 4 5 |
# File 'lib/ooxl/xl_objects/cell_style_reference.rb', line 3 def fill_id @fill_id end |
#font_id ⇒ Object
Returns the value of attribute font_id.
3 4 5 |
# File 'lib/ooxl/xl_objects/cell_style_reference.rb', line 3 def font_id @font_id end |
#id ⇒ Object
Returns the value of attribute id.
3 4 5 |
# File 'lib/ooxl/xl_objects/cell_style_reference.rb', line 3 def id @id end |
#number_formatting_id ⇒ Object
Returns the value of attribute number_formatting_id.
3 4 5 |
# File 'lib/ooxl/xl_objects/cell_style_reference.rb', line 3 def number_formatting_id @number_formatting_id end |
Class Method Details
.load_from_node(cell_style_xfs_node) ⇒ Object
7 8 9 10 11 12 13 14 15 |
# File 'lib/ooxl/xl_objects/cell_style_reference.rb', line 7 def self.load_from_node(cell_style_xfs_node) attributes = cell_style_xfs_node.attributes self.new( id: attributes["xfId"].value.to_i, number_formatting_id: attributes["numFmtId"].value.to_i, fill_id: attributes["fillId"].value.to_i, font_id: attributes["fontId"].value.to_i ) end |