Sha256: a15654cc867fca2d786ca633557ac1c7d71d22c6112b9c2bbdeb1bd3029b621a

Contents?: true

Size: 394 Bytes

Versions: 7

Compression:

Stored size: 394 Bytes

Contents

module OpenXml
  module Docx
    module Elements
      class Text < OpenXml::Docx::Element
        attr_reader :text

        tag :t

        attribute :space, one_of: [:preserve, nil], namespace: :xml

        def initialize(text=nil)
          @text = text
        end

        def to_xml(xml)
          xml["w"].public_send(tag, text, xml_attributes)
        end
      end
    end
  end
end

Version data entries

7 entries across 7 versions & 1 rubygems

Version Path
openxml-docx-0.11.5 lib/openxml/docx/elements/text.rb
openxml-docx-0.11.4 lib/openxml/docx/elements/text.rb
openxml-docx-0.11.3 lib/openxml/docx/elements/text.rb
openxml-docx-0.11.2 lib/openxml/docx/elements/text.rb
openxml-docx-0.11.1 lib/openxml/docx/elements/text.rb
openxml-docx-0.11.0 lib/openxml/docx/elements/text.rb
openxml-docx-0.11.0.rc lib/openxml/docx/elements/text.rb