Sha256: eadf6431ab2e715e296c828b6887a51f82959dbec0c2cbec9dbd75f96e36510e

Contents?: true

Size: 524 Bytes

Versions: 3

Compression:

Stored size: 524 Bytes

Contents

# frozen_string_literal: true

module Goldendocx
  module Components
    class Paragraph
      include Goldendocx::Element

      namespace :w
      tag :p

      embeds_one :property, class_name: 'Goldendocx::Components::Properties::Property', auto_build: true
      embeds_many :runs, class_name: 'Goldendocx::Components::Properties::Run'

      def align=(align)
        property.align.align = align if align
      end

      def style=(style)
        property.style.style_id = style if style
      end
    end
  end
end

Version data entries

3 entries across 3 versions & 1 rubygems

Version Path
goldendocx-0.3.0 lib/goldendocx/components/paragraph.rb
goldendocx-0.2.3 lib/goldendocx/components/paragraph.rb
goldendocx-0.2.2 lib/goldendocx/components/paragraph.rb