Class: OoxmlParser::GridSpan
- Inherits:
-
OOXMLDocumentObject
- Object
- OOXMLDocumentObject
- OoxmlParser::GridSpan
- Defined in:
- lib/ooxml_parser/common_parser/common_data/table/row/cell/grid_span.rb
Overview
Class for describing ‘gridSpan` tag
Instance Attribute Summary collapse
-
#type ⇒ String
readonly
Type of grid span.
-
#value ⇒ String
readonly
Value of grid span merged cells.
Attributes inherited from OOXMLDocumentObject
Instance Method Summary collapse
-
#initialize(parent: nil) ⇒ GridSpan
constructor
A new instance of GridSpan.
-
#parse(node) ⇒ GridSpan
Parse Grid Span data.
Methods inherited from OOXMLDocumentObject
#==, #boolean_attribute_value, #parse_xml, #with_data?
Methods included from OoxmlObjectAttributeHelper
#attribute_enabled?, #option_enabled?
Methods included from OoxmlDocumentObjectHelper
Constructor Details
#initialize(parent: nil) ⇒ GridSpan
Returns a new instance of GridSpan.
11 12 13 14 |
# File 'lib/ooxml_parser/common_parser/common_data/table/row/cell/grid_span.rb', line 11 def initialize(parent: nil) @type = 'horizontal' super end |
Instance Attribute Details
#type ⇒ String (readonly)
Returns type of grid span.
7 8 9 |
# File 'lib/ooxml_parser/common_parser/common_data/table/row/cell/grid_span.rb', line 7 def type @type end |
#value ⇒ String (readonly)
Returns value of grid span merged cells.
9 10 11 |
# File 'lib/ooxml_parser/common_parser/common_data/table/row/cell/grid_span.rb', line 9 def value @value end |
Instance Method Details
#parse(node) ⇒ GridSpan
Parse Grid Span data
19 20 21 22 23 24 25 26 27 |
# File 'lib/ooxml_parser/common_parser/common_data/table/row/cell/grid_span.rb', line 19 def parse(node) node.attributes.each do |key, value| case key when 'val' @value = value.value.to_i end end self end |