class OoxmlParser::Tabs
Class for working with `w:tabs`
Attributes
tabs_array[RW]
@return [Array, ParagraphTabs]
Public Class Methods
new(parent: nil)
click to toggle source
Calls superclass method
OoxmlParser::OOXMLDocumentObject::new
# File lib/ooxml_parser/common_parser/common_data/paragraph/paragrpah_properties/tabs.rb, line 10 def initialize(parent: nil) @tabs_array = [] super end
Public Instance Methods
[](key)
click to toggle source
@return [Array, Column] accessor
# File lib/ooxml_parser/common_parser/common_data/paragraph/paragrpah_properties/tabs.rb, line 16 def [](key) @tabs_array[key] end
empty?()
click to toggle source
@return [True, False] if empty
# File lib/ooxml_parser/common_parser/common_data/paragraph/paragrpah_properties/tabs.rb, line 21 def empty? @tabs_array.empty? end
parse(node)
click to toggle source
Parse Tabs
data @param [Nokogiri::XML:Element] node with Tabs
data @return [Tabs] value of Columns
data
# File lib/ooxml_parser/common_parser/common_data/paragraph/paragrpah_properties/tabs.rb, line 28 def parse(node) node.xpath('*').each do |node_child| case node_child.name when 'tab' @tabs_array << Tab.new(parent: self).parse(node_child) end end self end