Sha256: 86f325d9d163d25a7d0db43d5876acf064908dd3df9fb11e0be152bcdb7a710f

Contents?: true

Size: 379 Bytes

Versions: 7

Compression:

Stored size: 379 Bytes

Contents

module OpenXml
  module Docx
    module Elements
      class Text < 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.10.6 lib/openxml/docx/elements/text.rb
openxml-docx-0.10.5 lib/openxml/docx/elements/text.rb
openxml-docx-0.10.4 lib/openxml/docx/elements/text.rb
openxml-docx-0.10.3 lib/openxml/docx/elements/text.rb
openxml-docx-0.10.2 lib/openxml/docx/elements/text.rb
openxml-docx-0.10.1 lib/openxml/docx/elements/text.rb
openxml-docx-0.10.0 lib/openxml/docx/elements/text.rb