Sha256: 45885e49104b0ff43515675c5be39a40d45d92ab8d330c55d62af0961c3ba22b

Contents?: true

Size: 1015 Bytes

Versions: 1

Compression:

Stored size: 1015 Bytes

Contents

# frozen_string_literal: true

#
# Copyright (c) 2019-present, Blue Marble Payroll, LLC
#
# This source code is licensed under the MIT license found in the
# LICENSE file in the root directory of this source tree.
#

module Proforma
  class PrawnRenderer
    module Util
      # Defines what is allowed to be customized per rendering.
      class Options
        acts_as_hashable

        attr_reader :bold_font_style,
                    :font_name,
                    :fonts,
                    :header_font_size,
                    :text_font_size

        def initialize(
          bold_font_style: :bold,
          font_name: nil,
          fonts: [],
          text_font_size: 10,
          header_font_size: 15
        )
          @bold_font_style  = bold_font_style
          @font_name        = font_name
          @fonts            = Font.array(fonts)
          @text_font_size   = text_font_size
          @header_font_size = header_font_size

          freeze
        end
      end
    end
  end
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
proforma-prawn-renderer-1.1.0 lib/proforma/prawn_renderer/util/options.rb