Sha256: f8bf2cd8ef4d85fc49febb2118b510066bf2173c1d8e8371fc2df36c6273693d

Contents?: true

Size: 1015 Bytes

Versions: 6

Compression:

Stored size: 1015 Bytes

Contents

require 'stringio'

module RRTF
  # This class represents properties that are to be applied at the
  # document level.
  # @author Wesley Hileman
  # @since 1.0.0
  class DocumentProperties < Properties
    include DocumentFormatting
    include PageFormatting

     # This is a constructor for the DocumentProperties class.
     #
     # @param [Hash] options
     # @option options (see {DocumentFormatting#initialize_document_formatting})
     # @option options (see {PageFormatting#initialize_page_formatting})
     def initialize(options = {})
       initialize_document_formatting(options)
       initialize_page_formatting(options)
     end

     # Converts a document properties object into an RTF sequence.
     #
     # @return [String] the RTF sequence corresponding to the properties object.
     def to_rtf
       rtf = StringIO.new

       rtf << document_formatting_to_rtf
       rtf << page_formatting_to_rtf

       rtf.string
     end
  end # End of the DocumentProperties class
end # module RRTF

Version data entries

6 entries across 6 versions & 1 rubygems

Version Path
rrtf-1.3.1 lib/rrtf/properties/document_properties.rb
rrtf-1.3.0 lib/rrtf/properties/document_properties.rb
rrtf-1.2.0 lib/rrtf/properties/document_properties.rb
rrtf-1.1.0 lib/rrtf/properties/document_properties.rb
rrtf-1.0.1 lib/rrtf/properties/document_properties.rb
rrtf-1.0.0 lib/rrtf/properties/document_properties.rb