Sha256: a1470e2d40eb7c73153dd72a0623e5d988bfecbc0e7480e4bf92d398418cd23e

Contents?: true

Size: 562 Bytes

Versions: 5

Compression:

Stored size: 562 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.
#

require_relative 'renderer'

module Proforma
  class PrawnRenderer
    # This class understands how to ender a Proforma::Modeling::Text component.
    class TextRenderer < Renderer
      def render(text)
        pdf.text(
          text.value.to_s,
          font: font_name,
          size: text_font_size
        )
      end
    end
  end
end

Version data entries

5 entries across 5 versions & 1 rubygems

Version Path
proforma-prawn-renderer-1.0.3 lib/proforma/prawn_renderer/text_renderer.rb
proforma-prawn-renderer-1.0.2 lib/proforma/prawn_renderer/text_renderer.rb
proforma-prawn-renderer-1.0.1 lib/proforma/prawn_renderer/text_renderer.rb
proforma-prawn-renderer-1.0.0 lib/proforma/prawn_renderer/text_renderer.rb
proforma-prawn-renderer-1.0.0.pre.alpha.2 lib/proforma/prawn_renderer/text_renderer.rb