class OoxmlParser::TextField

Class for parsing ‘fld` tags

Attributes

id[RW]
text[RW]
type[RW]

Public Instance Methods

parse(node) click to toggle source

Parse TextField object @param node [Nokogiri::XML:Element] node to parse @return [TextField] result of parsing

# File lib/ooxml_parser/common_parser/common_data/paragraph/text_field.rb, line 11
def parse(node)
  @id = node.attribute('id').value
  @type = node.attribute('type').value
  node.xpath('*').each do |text_field_node_child|
    case text_field_node_child.name
    when 't'
      @text = text_field_node_child.text
    end
  end
  self
end