Sha256: db4d4c1e68afeec8f8365d877f99d9bf731951652df047ee5fa2e6335f595cde

Contents?: true

Size: 498 Bytes

Versions: 4

Compression:

Stored size: 498 Bytes

Contents

module OoxmlParser
  # Class for parsing `w:position` object
  class Position < OOXMLDocumentObject
    # @return [String] value of position
    attr_accessor :value

    # Parse Position
    # @param [Nokogiri::XML:Node] node with Position
    # @return [Position] result of parsing
    def parse(node)
      node.attributes.each do |key, value|
        case key
        when 'val'
          @value = OoxmlSize.new(value.value.to_f, :half_point)
        end
      end
      self
    end
  end
end

Version data entries

4 entries across 4 versions & 1 rubygems

Version Path
ooxml_parser-0.4.1 lib/ooxml_parser/common_parser/common_data/paragraph/paragraph_run/run_properties/position.rb
ooxml_parser-0.4.0 lib/ooxml_parser/common_parser/common_data/paragraph/paragraph_run/run_properties/position.rb
ooxml_parser-0.3.0 lib/ooxml_parser/common_parser/common_data/paragraph/paragraph_run/run_properties/position.rb
ooxml_parser-0.2.0 lib/ooxml_parser/common_parser/common_data/paragraph/paragraph_run/run_properties/position.rb